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

Multiple ID rednet.send()?

Started by basdxz, 24 August 2012 - 05:16 AM
basdxz #1
Posted 24 August 2012 - 07:16 AM
Hi I was wondering if it was possible to send a message to multiple computers with one send without using rednet.broadcast()?
Luanub #2
Posted 24 August 2012 - 09:38 AM
Yes, put the id's that you want to send the message to in a table the interate through the table with a for loop.


local sendTo = { 1, 2, 3, 4 } -- computer id's 1 - 4

write("enter message: ")
local msg = read()
for var, x in pairs(sendTo) do
rednet.send(x, msg)
end