Problem with the .exe created for my game [SOLVED]

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
Rastashmup
Prole
Posts: 14
Joined: Mon Jun 26, 2017 10:36 am

Problem with the .exe created for my game [SOLVED]

Post by Rastashmup »

Hello,

So I finished a game, and I created an .exe following the wiki and the following YouTube tutorial (which is in german)

https://www.youtube.com/watch?v=wAs1czKT87M

In my Project, I have a file "extendedLoader.lua" which is in the subfolder "luas" relative to my "main.lua". The main.lua has a require for "luas/extendedloader" included. The game runs just fine when I draw the game folder over the love.exe, but as soon as the game has its own .exe, I get the error:

main.lua:6: module "luas/extendedloader" not found:
no file "luas/extendedloader.lua" in LOVE game directories.

no extension "luas/extendedloader" in LOVE paths.

I went back and renamed the .love file that I used back into a .zip file so that I could re-check the content. The file extendedLoader.lua is in the folder luas where it belongs. If it is relevant, I'm still using löve version 9.0 to make the game run on an old Notebook, might be updating it to a newer version, but the process of creating an .exe should work the same with all löve versions. I also included all .dlls that came with löve into the same folder as my .exe. Also, I'm noticing that in the error output my file is called "extendedloader" with a small "l" instead of the capital "L" in the actual filename, I don't know why löve does this or if it makes a difference.
As for now, I don't know how to solve this problem or where it is coming from. So I'm asking you for advice.
Last edited by Rastashmup on Tue Sep 28, 2021 4:02 pm, edited 1 time in total.
User avatar
zorg
Party member
Posts: 3146
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Problem with the .exe created for my game

Post by zorg »

Two things to note and try:
1. the require function works with module paths, not file paths; you using `/` might or might not work, since you should use dots as separators, so: require 'luas.extendedLoader'

2. windows (the NTFS filesystem actually) might not care about file casing, but any other OS supported by löve (and the structures of zip files as well) do; make sure all your code correctly refers to filenames and paths with the correct lower or upper case letters.
Me and my stuff :3True 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.
Rastashmup
Prole
Posts: 14
Joined: Mon Jun 26, 2017 10:36 am

Re: Problem with the .exe created for my game

Post by Rastashmup »

Hi zorg,

Thanks for your reply. I somehow managed to not notice that I got the casing wrong in the require. When I fixed that, everything worked even with the slashes in my require commands. I put in the dots anyway since it is more correct.

So the problem has been solved. How do I mark this thread as solved?
User avatar
zorg
Party member
Posts: 3146
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Problem with the .exe created for my game

Post by zorg »

You should be able to edit your first post with the pencil icon on the top-left near your name, and put [SOLVED] in front of the subject in the subject field ("Problem with the .exe created for my game")
Me and my stuff :3True 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests