Posted 02 September 2012 - 01:39 PM
hia, how do you make it so a pc detects the message sent and depending on that message it does something. i think its "if receive = message" but that seems stupid.
event, p1, p2 = os.pullEvent()
if event == "rednet_message" then
print("sender : "..p1.." message: "..p2..")
--Stuff to do when we got a renet msg
end
id, msg, dis rednet.receive(timeout) -- like io.read where it will wait
print("From: "..id)
print("Message: "..msg)
this is how i do all my rednet things