Page 1 of 1
love.filesystem.include and love.filesystem.require for 0.6
Posted: Sun Dec 27, 2009 11:26 am
by Deco
Howdy.
I've searched
everywhere I
could think
of. However, I could not find an answer to my questions.
Is there a way to include files and require modules in 0.6?
love.filesystem.include and love.filesystem.require no longer exist, and the global include and require functions never existed.
Help, please!
Re: love.filesystem.include and love.filesystem.require for 0.6
Posted: Sun Dec 27, 2009 12:08 pm
by rude
Use the standard Lua require, e.g:
Re: love.filesystem.include and love.filesystem.require for 0.6
Posted: Sun Dec 27, 2009 12:14 pm
by Deco
Ah, thank you. I had forgotten to remove the '.lua' suffix, and didn't bother reading the error message properly.
Now.. er, how about 'include'? Just use require, perhaps?
I tried dofile, but it keeps saying the file does not exist (both with and without the extension).
Re: love.filesystem.include and love.filesystem.require for 0.6
Posted: Sun Dec 27, 2009 12:15 pm
by Deco
Never mind, require works just fine!
Thank you!
Re: love.filesystem.include and love.filesystem.require for 0.6
Posted: Sun Dec 27, 2009 12:29 pm
by bartbes
Include behavior can be replicated with:
Re: love.filesystem.include and love.filesystem.require for 0.6
Posted: Tue Dec 29, 2009 12:18 pm
by Geti
for the record, is there a reason dofile is gimped?
Re: love.filesystem.include and love.filesystem.require for 0.6
Posted: Tue Dec 29, 2009 12:21 pm
by Robin
Geti wrote:for the record, is there a reason dofile is gimped?
I guess because it is not used that often?
Re: love.filesystem.include and love.filesystem.require for 0.6
Posted: Tue Dec 29, 2009 12:49 pm
by bartbes
Because it just doesn't use love.filesystem, and it doesn't have an easy interface like require has.