Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local term = require("term")
- function printSomething()
- print("what up?")
- os.sleep(1) --to see that the io.read get skipped
- local i = io.read()
- end
- while(true) do
- term.clear()
- print("enter a number")
- print("1: do something")
- print("2: do somethingelse")
- local select = io.read("*n")
- if select == 1 then printSomething() end
- if select == 2 then printSomething() end
- end
Advertisement
Add Comment
Please, Sign In to add comment