Jump to content




Please delete


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

#1 xxx

  • New Members
  • 28 posts

Posted 29 December 2012 - 07:06 AM

Please delete

Edited by Peter110, 27 December 2013 - 04:37 PM.


#2 NDFJay

  • Members
  • 216 posts
  • LocationLeeds, England

Posted 29 December 2012 - 07:11 AM

1) your if statement looks for a string so quote on and off like this

if input == "on" then
--------------------------
if input == "off" then
---------------------------

2) I dont know much about rednet so hopefully someone else can answer that for you.

hope this help you
~NDFJay

#3 xxx

  • New Members
  • 28 posts

Posted 29 December 2012 - 07:35 AM

Please delete

Edited by Peter110, 27 December 2013 - 04:37 PM.


#4 Viproz

  • Members
  • 58 posts

Posted 29 December 2012 - 07:35 AM

for rednet api you can go on the wiki http://computercraft...iki/Rednet_(API) but i don't think you'll can do what you want.

you can always have 2 lines with the exact same message :

msg = "hello world"
rednet.send(54, msg)
rednet.send(69, msg)

or even with a for loop and a table

#5 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 29 December 2012 - 09:45 AM

View PostViproz, on 29 December 2012 - 07:35 AM, said:

you can always have 2 lines with the exact same message :

msg = "hello world"
rednet.send(54, msg)
rednet.send(69, msg)

or even with a for loop and a table

With a table, you can do it like this:
-- Define the tables that we will send the command to
t_IDs = {54, 69, 32, 102, 19, 94}
-- Loop through the table and send the message to each ID
for i = 1, #t_IDs do
    rednet.send(t_IDs[i], msg)
end

That simple :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users