function foo(...)
print(arg[1])
print(arg[2])
end
function love.load()
foo("sample", 123)
end
It prints something really weird. In the first case it prints the path to the project: "C:\Projects\ProjectFolder" and in the second case it is nil. Somebody had this bug?
As Nixola mentioned, 'arg' as an implicitly created table for var-arg parameters in functions was deprecated in Lua 5.1 (2006). Unfortunately the official online version of the Programming in Lua book is written based on Lua 5.0, so it doesn't tell you that.
Better to not use the name 'arg' at all, since you'll be shadowing the global 'arg' table (which contains command-line arguments passed to love.)