love.filesystem.load(file)(arguments)?
Posted: Thu Jul 12, 2012 6:42 pm
Pretty much the topic title. Is it possible to use arguments with a loaded lua file this way?
I have, but what will the arguments be named within the .lua file? I can't define them myself.Robin wrote:Have you tried it yourself?
I'm sorry I'm not answering your question (although my guess would be that the answer is "yes"), but for things like that, it's easier to just try it out yourself.
Code: Select all
local args = {...}
Code: Select all
local param1, param2 = ...
Thanks!teomat wrote:They are passed in the vararg parameter '...'
Edit: To clarify, you can either push them into a table likeand iterate over themCode: Select all
local args = {...}
or extract them to local variables likeCode: Select all
local param1, param2 = ...