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!
love.filesystem.include and love.filesystem.require for 0.6
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: love.filesystem.include and love.filesystem.require for 0.6
Use the standard Lua require, e.g:
Code: Select all
-- foo.lua
require("foo")
Re: love.filesystem.include and love.filesystem.require for 0.6
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).
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
Never mind, require works just fine!
Thank you!
Thank you!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: love.filesystem.include and love.filesystem.require for 0.6
Include behavior can be replicated with:
Code: Select all
love.filesystem.load(<file>)()
Re: love.filesystem.include and love.filesystem.require for 0.6
for the record, is there a reason dofile is gimped?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: love.filesystem.include and love.filesystem.require for 0.6
I guess because it is not used that often?Geti wrote:for the record, is there a reason dofile is gimped?
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: love.filesystem.include and love.filesystem.require for 0.6
Because it just doesn't use love.filesystem, and it doesn't have an easy interface like require has.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests