Hello, i want to do app that sends via rednet.broadcast message which received.
Thank you.
Rednet send = rednet.receive
Started by ShifterCZ, Mar 19 2014 05:24 PM
3 replies to this topic
#1
Posted 19 March 2014 - 05:24 PM
#2
Posted 19 March 2014 - 06:44 PM
I've edited your title for you; your question is not a higher (or lower) priority than anyone else's questions
#3
Posted 19 March 2014 - 07:44 PM
Do you mean something like this?
while true do -- Infinite loop
local id, message -- Make the variabled local to the main loop
repeat -- Loop and make sure you haven't received your own message
id, message = rednet.receive() -- Get the id and message
until id ~= os.getComputerID() -- Check the id
rednet.broadcast( message ) -- Broadcast the message you received
end
--# My indentation may get screwed up by the forum
If I understood correctly it's something like this you want right?
#4
Posted 20 March 2014 - 01:47 PM
Thank you very much.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











