Posted 03 April 2012 - 04:26 AM
I am baffled as to why this won't work. I've checked out Casper's tutorial on events as well as read some on lua events, however, I feel like I've done this code correctly. Basically, it responds to the "rednet_message" event. But, when one is at the local machine and presses "1" it indicates it is an invalid selection. Is it the order of the events?
while true do
event, p1, p2 = os.pullEvent()
if event == "rednet_message" and p2 == "water" then
waterremote()
end
if event == "char" and p1 == "1" then
water()
else
print("Invalid Selection!")
sleep(3)
shell.run("startup")
end
end