In my lua program, i want to stop and ask user for confirmation before proceeding with an operation. I'm not sure how to stop and wait for user input, how can it be done?
相关问题
- How to get the return code of a shell script in lu
- Accessing Light userdata in Lua
- Making turtles wait x number of ticks
- bash read timeout only for the first character ent
- Prevent Anti-Virus to block outgoing email with C#
相关文章
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Lua Integer type
- C# : How to pause the thread and continue when som
- First character uppercase Lua
- Meteor blocking clarification
- How do I get hibernate to generate Oracle's FO
- Better way to constantly run function periodically
- delay/sleep in Swift is not working
I've worked with code like this. I will type this in a way it will work:
From the bit of lua that I've done (not a lot), I'm going to say that using both uppercase and lowercase letters is redundant if you use string.sub.
That should work.
Take a look at the
io
library, which by default has standard-input as the default input file:http://www.lua.org/pil/21.1.html
I use:
try to use folowing code
m=io.read()
if m=="yes" then
(insert functions here)
end