could you please help me set up environment for Lua in Windows. I have added following C:\lua\bin to the PATH system env. variables. But when I try to run file for example test.lua with print("hello world") interpreter probably sees the file but I get this message in git-bash:
$ test.lua
/c/lua/bin/test.lua: line 1: syntax error near unexpected token "hello world"
/c/lua/bin/test.lua: line 1: print("hello world")
And when I try to open test.lua in cmd there are no errors just the Notepad with code opens...but code in file isnt executed. Thank you
bash and cmd don't know that you want to execute the file using the Lua interpreter.
I assume that the Lua interpreter is at C:\lua\bin\lua.exe? If so, you should be able to run your script using the command
lua test.lua. In bash, you might need to do/c/lua/bin/lua test.luainstead.