I'm doing a tutorial on learning lua: https://www.lua.org/pil/1.html
I'm trying to open a simple file called hello.lua that I created with Textedit, located in the folder "luaProjects". The file contains the following line:
print("Hello World")
I get an error however, when I try to run the hello world script like this:
luaProjects username$ lua hello.lua
lua: hello.lua:1: unexpected symbol near char(226)
I think that lua is installed correctly:
User-MacBook-Air:~ username$ lua -v
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
And I think that I have set the folder and file up correctly:
User-MacBook-Air:luaProjects username$ tree
.
└── hello.lua
0 directories, 1 file
Q: Does anyone know how to fix this?