This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jaster's profile picture

Basic Input Handling

Started by Jaster, 04 May 2013 - 06:36 AM
Jaster #1
Posted 04 May 2013 - 08:36 AM
http://pastebin.com/U50W5WUS
I have to input something twice times before It actually reads the input.
Please help thanks.
Also if I want it so whenever someone enters something that isn't in the put to say "Sorry, what?"
and then to restart the whole program again.
Lyqyd #2
Posted 05 May 2013 - 02:40 AM
Split into new topic. A title was provided for you.
Smiley43210 #3
Posted 05 May 2013 - 02:51 AM
You put "input = read()" twice. Remove the first occurrence.

Also, to restart, don't shell.run() the file AGAIN. That's bad. Very bad. Instead, use a loop, such as a while loop. Wrap the whole thing in something like "while true do", and you're set. Don't forget to put an "end" at the very end!