I'm a new LUA user, version 5.3 and I came across a function statement that is a bit confusing. I've tried to find some explanation in the reference manual but to no avail.
function myfunc.execute()
print("Hello")
end
I don't understand this syntax. Does this mean to add ".execute()"?
Below is a example file that fails to print within the table myfunc.
local myfunc = {}
myfunc.version = "2.0"
function myfunc.execute()
print("Hello World!")
end
return myfunc
When I run this i get no print out: "Hello World!". I'm trying to understand how lua works here when executing the above script in a file. Why does the print statement not work?
myfuncis a table,executeis a function located inside that table. - Egor Skriptunoff