Page 1 of 1

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

Posted: Mon Sep 27, 2021 2:09 pm
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.

Re: Problem with the .exe created for my game

Posted: Mon Sep 27, 2021 7:15 pm
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.

Re: Problem with the .exe created for my game

Posted: Tue Sep 28, 2021 9:39 am
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?

Re: Problem with the .exe created for my game

Posted: Tue Sep 28, 2021 1:32 pm
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")