Jump to content




Rednet send = rednet.receive


  • You cannot reply to this topic
3 replies to this topic

#1 ShifterCZ

  • New Members
  • 2 posts

Posted 19 March 2014 - 05:24 PM

Hello, i want to do app that sends via rednet.broadcast message which received.

Thank you.

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

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 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

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 ShifterCZ

  • New Members
  • 2 posts

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