This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
lukasloko's profile picture

Dns server help!

Started by lukasloko, 18 May 2015 - 02:49 PM
lukasloko #1
Posted 18 May 2015 - 04:49 PM
HELP me !!
I made a internet network in some days ago .. And I updated my computer craft and the network is no more working properly…
Sorry for my bad English..
So , here is the code.. ( I think this is the right forum )
http://pastebin.com/D91shDm1
I am geting the function error404()
Edited on 18 May 2015 - 02:57 PM
TheOddByte #2
Posted 18 May 2015 - 05:15 PM
Try moving the function error404 above the dns function
lukasloko #3
Posted 18 May 2015 - 09:16 PM
I will try
lukasloko #4
Posted 18 May 2015 - 09:25 PM
this do not work…
Dragon53535 #5
Posted 19 May 2015 - 12:34 AM
Show the current code then
lukasloko #6
Posted 28 May 2015 - 04:47 PM
I don't think this is really necessary because i don't get what are he talking about… So i make this:
Original:
dns()
–codes
end
error404()
–codes
end
Now:
error404()
–codes
end
dns()
–codes
end
========
So i don't' think is that what he tried to say…
P.S.
the error function are called when
not rednet.send(blabla,blabla)
.

Anyone can explain me better?
Bomb Bloke #7
Posted 29 May 2015 - 12:05 AM
What exactly does the whole error say?
lukasloko #8
Posted 30 May 2015 - 09:24 PM
The error is not a CC default error , is my custom error. The error404() is a function which occurs when: not rednet.send()
And this is the problem , why is not sending the message?

P.S.: If is not what you mean to say sorry, i don't speak English very well..
Lyqyd #9
Posted 30 May 2015 - 09:30 PM
Rednet.send always returns nil in recent versions.
lukasloko #10
Posted 01 June 2015 - 07:03 PM
So if a command always return nil , the computer assumes the code got a error?So , thanks for all.. I will repair and reply if i get more errors.
Lyqyd #11
Posted 02 June 2015 - 01:14 AM
No, "the computer" doesn't assume anything. If your code calls the error function based on the condition not rednet.send(…), then it will always call that error function, since rednet.send always returns nil. The problem is in your code's assumptions, not assumptions that "the computer" is making.