It looks like the issue with my font was due to letter case. I corrected that, uncommented my font calls and created another exe.
After creating the exe I moved my .love file to my desktop. The .love still runs outside of my project folder and outside of the love folder. When creating the exe, my love file does need to be in the love folder with love.exe, right?
The exe still won't run, but I don't get an error for my font anymore. It gives me:
'Error
objects/sound.lua:1: attempt to index field 'audio' (a nil value)
Traceback
objects/sound.lua:1: in main chunk
[C]: in function 'require'
main.lua:60: in function 'requireFiles'
main.lua:18: in function 'load'
main.lua:66: in function <main.lua:64>
[C]: in function 'xpcall'
[C]: in function 'xpcall''
Is there anything I'm required to do after creating the exe? Right now I'm just letting it sit in the love folder with love.exe. I've tried moving it to my project folder and after copying all the dlls in the love folder, it gives me the same error.
Created .exe, when running .exe error unable to load audio file
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Created .exe, when running .exe error unable to load audio file
As far as I know there's two ways of running your LÖVE games:
- Command-line:
- love.exe "path/to/folder" (running the main script directly, it should be inside /folder/)
- love.exe "other/path/to/myGame.love" (running the main script inside the top level of the .love archive)
- Embedding the .love within the love.exe, then distributing this modified .exe alongside the auxiliary DLLs.
So the game distribution in this case looks like this:- My-Super-Duper-Game-v1.0.0.exe (modified exe with the embedded .love)
- SDL2.dll
- love.dll
- ... (other DLL files)
Re: Created .exe, when running .exe error unable to load audio file
This is the first time we get to see an error message. So, the first line of objects/sound.lua has something that upsets the interpreter, and it may well not be due to a problem with a file. What does that line look like?
Re: Created .exe, when running .exe error unable to load audio file
sFile = love.audio.newSource("subfolder/casecorrectfilename.ogg", "static")
Re: Created .exe, when running .exe error unable to load audio file
Well, that's intriguing. What the error message is saying, is that love.audio is not defined (but love is).
Do you have the audio module enabled in conf.lua?
Do you have the audio module enabled in conf.lua?
Re: Created .exe, when running .exe error unable to load audio file
Yes, it is set to true in conf.lua.
Re: Created .exe, when running .exe error unable to load audio file
Hmm, perhaps you're missing a DLL or something like that. I don't have experience with Windows, sorry.
"Once you have your game executable you can pack it together with all the other DLL files of the official LÖVE .zip file into a new .zip file and share this with the world."
https://love2d.org/wiki/Game_Distribution (emphasis added)
"Once you have your game executable you can pack it together with all the other DLL files of the official LÖVE .zip file into a new .zip file and share this with the world."
https://love2d.org/wiki/Game_Distribution (emphasis added)
Re: Created .exe, when running .exe error unable to load audio file
I appreciate the help. I had all the dlls from the zip file with the exe.
I ended up just removing the sound.lua file from the folder it was in and setting it with main.lua. It runs now.
I ended up just removing the sound.lua file from the folder it was in and setting it with main.lua. It runs now.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Created .exe, when running .exe error unable to load audio file
i'm still interested though; can you share your sound.lua ('s contents)?
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Created .exe, when running .exe error unable to load audio file
If it was the first line of the file, it means that the contents don't matter; the problem was already present when getting there.
The only possible explanation I can think of is that some part of the code removed 'audio' from the love table. It would be interesting to see function requireFiles().
The only possible explanation I can think of is that some part of the code removed 'audio' from the love table. It would be interesting to see function requireFiles().
Who is online
Users browsing this forum: No registered users and 12 guests