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

Rednet send = rednet.receive

Started by ShifterCZ, 19 March 2014 - 04:24 PM
ShifterCZ #1
Posted 19 March 2014 - 05:24 PM
Hello, i want to do app that sends via rednet.broadcast message which received.

Thank you.
Lyqyd #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
TheOddByte #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?
ShifterCZ #4
Posted 20 March 2014 - 01:47 PM
Thank you very much.