1 posts
Posted 04 July 2014 - 08:27 AM
print("online")
while true do
rednet.open(3)
message == "1"
then
redstone.setOutput("back",true)
sleep(30)
redstone.setOutput("back", false)
end
print("off")
end
Please correct my code
note this is 1.6.4
14 posts
Posted 04 July 2014 - 04:54 PM
What exactly are you trying to do? Your title is vague, and you code is not much better.
Are you trying to make a rednet chat system or something of the sort?
Edited on 04 July 2014 - 02:54 PM
3057 posts
Location
United States of America
Posted 04 July 2014 - 05:23 PM
I think he is trying to emulate wireless redstone.
corrected ( i think ) code
print( "online" )
rednet.open( "side" ) --#note, sides are not numaric. "right", "left", "top", etc.
while true do
local id, message = rednet.receive() --#recieve a message from the rednet
if message == "1" then --#I assume you sent "1", not 1, since 1 ~= "1"
print( "on" )
rs.setOutput("back", true)
sleep( 30 ) --#pause for 30 seconds
rs.setOutput("back", false)
end
print( "off" )
end