Edited by Peter110, 27 December 2013 - 04:37 PM.
Please delete
Started by xxx, Dec 29 2012 07:06 AM
4 replies to this topic
#1
Posted 29 December 2012 - 07:06 AM
Please delete
#2
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
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
Posted 29 December 2012 - 07:35 AM
Please delete
Edited by Peter110, 27 December 2013 - 04:37 PM.
#4
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 :
or even with a for loop and a table
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
Posted 29 December 2012 - 09:45 AM
Viproz, on 29 December 2012 - 07:35 AM, said:
you can always have 2 lines with the exact same message :
or even with a for loop and a table
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











