Page 1 of 1

[FIXED]Fused executable not working as intended

Posted: Sat May 24, 2014 10:42 pm
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

Re: Fused executable not working as intended

Posted: Sat May 24, 2014 11:04 pm
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)()

Re: Fused executable not working as intended

Posted: Sat May 24, 2014 11:14 pm
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

Re: [FIXED]Fused executable not working as intended

Posted: Sun May 25, 2014 2:15 am
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.