Jump to content




Basic Input Handling


  • You cannot reply to this topic
2 replies to this topic

#1 Jaster

  • New Members
  • 1 posts

Posted 04 May 2013 - 07: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.

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 05 May 2013 - 01:40 AM

Split into new topic. A title was provided for you.

#3 Smiley43210

  • Members
  • 204 posts

Posted 05 May 2013 - 01: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!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users