love.filesystem.load(file)(arguments)?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
love.filesystem.load(file)(arguments)?
Pretty much the topic title. Is it possible to use arguments with a loaded lua file this way?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: love.filesystem.load(file)(arguments)?
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.
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.
Help us help you: attach a .love.
Re: love.filesystem.load(file)(arguments)?
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.
Re: love.filesystem.load(file)(arguments)?
They are passed in the vararg parameter '...'
Edit: To clarify, you can either push them into a table like and iterate over them
or extract them to local variables like
Edit: To clarify, you can either push them into a table like
Code: Select all
local args = {...}
or extract them to local variables like
Code: Select all
local param1, param2 = ...
Re: love.filesystem.load(file)(arguments)?
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 = ...
Who is online
Users browsing this forum: No registered users and 6 guests