Posted 22 February 2013 - 12:54 AM
I am trying to run a Startup program that waits for one of two actions.
1st action: A rednetmessage
2nd action: Someone clicking to enter the console.
I am using this code that i have written but the system runs the code but it does nothing when clicking it or receiving a rednet message.
rednet.close("back")
rednet.open("back")
while true do
event, message = os.pullEvent()
if event == "mouse_click" then
shell.run("Movelobby")
else
if event == "rednet_message" then
if message == "open door" then
rs.setOutput("left", true)
shell.run("sulobby")
end
end
end
end
Thankyou in advance
1st action: A rednetmessage
2nd action: Someone clicking to enter the console.
I am using this code that i have written but the system runs the code but it does nothing when clicking it or receiving a rednet message.
rednet.close("back")
rednet.open("back")
while true do
event, message = os.pullEvent()
if event == "mouse_click" then
shell.run("Movelobby")
else
if event == "rednet_message" then
if message == "open door" then
rs.setOutput("left", true)
shell.run("sulobby")
end
end
end
end
Thankyou in advance
Edited on 22 February 2013 - 04:03 AM