- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Catythcatmunchr
-
Content Count
2 -
Joined
-
Last visited
Posts posted by Catythcatmunchr
-
-
For some reason break isn't exiting this while loop, when I input "exit" it just prints it and continues the loop instead leaving it.
While true do
Local input = term.read ()
Term.write (input)
If input == "exit" then
Break
End
End
Break not exiting while loop
in Programming
Posted
Thank you, input:sub(-2) didn't work but io.read() did work. I searched through the documentation and you are correct that term.read() adds a newline char.