Posted 06 March 2014 - 02:57 AM
I want to make this so that it will send the respective rednet broadcasts, and that works. I also want it to say "Invalid Floor!" for any number other and 1,2, and 3.
Right now it just gives me a bunch of errors about expecting end in places to close the while true statement.
How can I make this work?
rednet.open("back")
while true do
term.clear()
term.setCursorPos(1, 1)
print("Enter Desired Floor #:")
input = read()
if input == "1" then
rednet.broadcast("1")
if input == "2" then
rednet.broadcast("2")
if input == "3" then
rednet.broadcast("3")
else print("Invalid Floor!")
sleep(3)
end
end
Right now it just gives me a bunch of errors about expecting end in places to close the while true statement.
How can I make this work?