Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MODEM_SIDE = "bottom"
- local SERVER_ID = 1;
- local MAXIMUM_LEVEL = 2
- rednet.open(MODEM_SIDE);
- rednet.broadcast("stop");
- function receiveInput()
- print("Enter Floor Number: ")
- local input = tonumber(read())
- if type(input) == "number" then
- if input > MAXIMUM_LEVEL or input <= 0 then
- print("Level not in bounds.")
- receiveInput()
- return
- end
- rednet.broadcast({input})
- receiveInput()
- return
- else
- print("You're bad. Use an actual number.")
- receiveInput()
- return
- end
- end
- receiveInput();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement