Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help,
read this .
Deco
Prole
Posts: 3 Joined: Sun Dec 27, 2009 11:21 am
Post
by Deco » Sun Dec 27, 2009 11:26 am
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!
rude
Administrator
Posts: 1052 Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway
Post
by rude » Sun Dec 27, 2009 12:08 pm
Use the standard Lua require, e.g:
Deco
Prole
Posts: 3 Joined: Sun Dec 27, 2009 11:21 am
Post
by Deco » Sun Dec 27, 2009 12:14 pm
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).
Deco
Prole
Posts: 3 Joined: Sun Dec 27, 2009 11:21 am
Post
by Deco » Sun Dec 27, 2009 12:15 pm
Never mind, require works just fine!
Thank you!
bartbes
Sex machine
Posts: 4946 Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:
Post
by bartbes » Sun Dec 27, 2009 12:29 pm
Include behavior can be replicated with:
Geti
Party member
Posts: 112 Joined: Tue Oct 20, 2009 6:38 am
Post
by Geti » Tue Dec 29, 2009 12:18 pm
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:
Post
by Robin » Tue Dec 29, 2009 12:21 pm
Geti wrote: for the record, is there a reason dofile is gimped?
I guess because it is not used that often?
bartbes
Sex machine
Posts: 4946 Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:
Post
by bartbes » Tue Dec 29, 2009 12:49 pm
Because it just doesn't use love.filesystem, and it doesn't have an easy interface like require has.
Users browsing this forum: Bing [Bot] , Google [Bot] , Semrush [Bot] and 2 guests