Lua Tutorial
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they were following when they hit setup or io.read() problems, so it works as a reference for beginners learning Lua.
Recommended by 0 people across 0 different months, 2019 to 2020.
What it is
A 57-minute single-sitting tutorial by Derek Banas that teaches the Lua language from scratch. It covers data types, conditionals, loops, user input, tables, functions, closures, coroutines, file I/O, modules, metatables, and object-oriented programming with inheritance.
What people said
Cites RobloxDev · 2019-03 · Stack Overflow · on “How to debug Roblox programs written in Lua?”
repeat io.write("Enter your guess : ") -- Gets input from the user guess = io.read() -- Either surround the number with quotes, or convert the string into -- a number until tonumber(guess) == 15 I also tried replacing io.read() with os.read() but it didn't work, and I don't know why, because it worked for Derek. See this video [this video] at 20:46.
Cites arsy · 2019-11 · Stack Overflow · on “Lua CLI installation - How do I get the terminal command 'lua' to work on OSX?”
I just installed Lua and I'm following a tutorial but I'm running into a problem straight off, the tutorial simply says to run a file use the terminal command $lua filename.lua When I do try using the command $lua I get the error bash: lua: command not found . I can't find the CLI command $lua addressed anywhere in the Lua docs and it's not addressed in the video. I saw elsewhere that you could just run $helloworld.lua in the command line but that gives me the same error. The exact command I'm running is: admins-MacBook-Pro:LuaPractice admin$ lua helloworld.lua bash: lua: command not found I have successfully installed Lua, following running these commands from lua.org: $curl -R -O [LINK] $t
Cites Mr. yes · 2020-09 · Stack Overflow · on “LUA io.read() statement makes a output blank”
SO I've been following a Lua tutorial for the past two days ( [this video] ) and I've got stuck on a repeat loop because the output is empty here is the code: repeat io.write("Enter your guess : ") guess = io.read() until tonumber(guess) == 15 Every time I run it, it shows a blank output with no errors The problem seems to be caused by io.read() But I am not sure I also downloaded some packages if it matters: Lua Dev, BracketHighLighter, SidebarEnhancements, SublimeLinter, SubLimeLinter-Lua,