Posted 11 June 2014 - 06:37 PM
Heyho everyone,
i got a litte question by using rednet. It is about a kind of security. I would like to check the senderid bevor doing something else, but it is not working. Google and the wiki didnt help so far.
My Code:
Computer 1 (Transmitter)
Computer 2 (Receiver)
I tryed to check which computer has send the "message"..
I'm looking for some help and sorry for my bad english - not well trained jet :(/>
i got a litte question by using rednet. It is about a kind of security. I would like to check the senderid bevor doing something else, but it is not working. Google and the wiki didnt help so far.
My Code:
Computer 1 (Transmitter)
rednet.open("right")
rednet.send(5, "cauf")
rednet.close("right")
Computer 2 (Receiver)
[...]
rednet.open("bottom")
local senderID, message, protocol = rednet.receive()
if senderID == 1 then
-- Do stuff here.
else
print("Sender not allowed!")
end
[...]
I tryed to check which computer has send the "message"..
I'm looking for some help and sorry for my bad english - not well trained jet :(/>