I run the program and writes
'=' expected near 'while' Program code
local menu = none, admin exit, finc while true do io.write("> ") err, finc = pcall(io.read) elseif finc == admin then break end I run the program and writes
'=' expected near 'while' Program code
local menu = none, admin exit, finc while true do io.write("> ") err, finc = pcall(io.read) elseif finc == admin then break end the form
переменная1, переменная2 = значение1, значение2 used in lua for "group" value assignment :
переменная1 will get значение1 , переменная2 be значение2 .
I suspect that this line:
local menu = none, admin exit, finc you wanted to assign the string "none" to the menu variable, admin - the string "exit" , and just declare finc as local. then it was necessary to do something like this:
local menu, admin = "none", "exit" local finc Source: https://ru.stackoverflow.com/questions/515681/
All Articles