willyb321

test4

May 9th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. local runs = 0
  2. local dorun
  3. function iDunno()
  4.   local stoprun = 0
  5. repeat
  6.   io.write("Do you want to continue? (y/n) ")
  7.   io.flush()
  8.   dorun = io.read()
  9. if dorun == "y" then
  10.   runs = runs + 1
  11. print("Current run number is: "..runs.."")
  12.  
  13. else
  14. print("exiting, number of runs was "..runs.."")
  15. stoprun = 1
  16. end
  17. until stoprun == 1
  18. end
  19.  
  20. iDunno()
Add Comment
Please, Sign In to add comment