[FIXED]Fused executable not working as intended

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.
Post Reply
User avatar
Splatpope
Prole
Posts: 4
Joined: Sat May 24, 2014 10:31 pm

[FIXED]Fused executable not working as intended

Post by Splatpope »

Hello there, first things first, here is the faulty .love file : http://filesmelt.com/dl/decker.love

Basically, it works very well when it's contents are executed separately (when ran with ZeroBrane, for example), but if ran as a .love file (or a fused exe, it doesn't matter), it outputs this error :

Image

Every step of the game distribution tutorial were followed very precisely, the .love was originally a .zip and the .zip's contents are main, conf and the game resources.

I can't think of anything faulty here, except maybe for dofile's behavior, but I'd prefer if this was not the case...

If you people could help me find why this doesn't work, I'd be very thankful :D
Last edited by Splatpope on Sat May 24, 2014 11:18 pm, edited 1 time in total.
User avatar
DaedalusYoung
Party member
Posts: 413
Joined: Sun Jul 14, 2013 8:04 pm

Re: Fused executable not working as intended

Post by DaedalusYoung »

I suspect it's confused because you're attempting to load it from a different folder.

This seems to work fine though:

Code: Select all

rawMaps[k] = love.filesystem.load("maps/"..v)()
User avatar
Splatpope
Prole
Posts: 4
Joined: Sat May 24, 2014 10:31 pm

Re: Fused executable not working as intended

Post by Splatpope »

DaedalusYoung wrote:I suspect it's confused because you're attempting to load it from a different folder.

This seems to work fine though:

Code: Select all

rawMaps[k] = love.filesystem.load("maps/"..v)()
Hmm, yes, I had trouble with all those load functions before, which is why I settled for dofile(), but I will try out this one and post the results.



EDIT :

It worked out very well, thanks a lot ! :D Next time, I'll be more wary of which function I use, I suspect dofile() uses the wrong relative path after all :v
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: [FIXED]Fused executable not working as intended

Post by slime »

Yeah, Lua's built-in dofile and loadfile don't know about love.filesystem's read directories (and they don't use platform-independent filepaths either.) The require function and love.filesystem.load both work fine though. You should usually use the require function (e.g. require("maps.testmap")) unless the file's contents might change while the game is running.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 3 guests