Related to #125 , how does one pass arguments to a script_file?
I don't think there's a well-defined way to do it.
Copying the example from the related issue, I would assume its by doing this
sol::load_result fx = lua.load_file("script.lua");
fx("your", "arguments", "here");
-- script.lua
local a,b,c = ...
print(a,b,c)
Tested and seems to work fine.
Or did I misunderstand what passing arguments to script file meant?
Well, today I learned something new. Neato.
I'll tag this as documentation, since it should probably be put in the docs.
Yup, every script/chunk you execute can be viewed as a function, it's pretty neat. :)
Most helpful comment
Copying the example from the related issue, I would assume its by doing this
Tested and seems to work fine.
Or did I misunderstand what passing arguments to script file meant?