This function waits for a line of text to be input into the program console.
Parameter | Description |
---|---|
message | message to print before the input is received. |
When the user enters some text and presses enter, the typed input is returned.
On Windows, the project must be built as a console app. In Configuration Properties > Linker > System set SubSystem to Console.
local s = Input("Enter your name:")
Print("You entered \"" .. s .. "\".")