I just get a message when I try to run a basic love game:
Error
boot.lua:258: No code to run
Your game might be packaged incorrectly
Make sure main.lua is at the top level of the zip
Traceback
[C]: in function 'error'
[C]: in function 'xpcall'
Love won't start
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Love won't start
This means that love is looking for a file called main.lua on the .love file but it can't find it.
This usually happens because main.lua is "inside a folder in the zip file".
If you are under windows, the correct way to create a .love file is:
1. Open to the folder in which your main.lua is (you must see the main.lua file)
2. Select the main.lua file and all other folders on the folder
3. With all the files selected, left-click and create a zip. Then rename the zip to .love.
If you do this from the folder that is "one level up" of your main.lua, you will end up with a zip file with a directory inside. With the 3 steps above, the zip file will not have that folder.
This usually happens because main.lua is "inside a folder in the zip file".
If you are under windows, the correct way to create a .love file is:
1. Open to the folder in which your main.lua is (you must see the main.lua file)
2. Select the main.lua file and all other folders on the folder
3. With all the files selected, left-click and create a zip. Then rename the zip to .love.
If you do this from the folder that is "one level up" of your main.lua, you will end up with a zip file with a directory inside. With the 3 steps above, the zip file will not have that folder.
When I write def I mean function.
-
- Prole
- Posts: 3
- Joined: Wed Mar 17, 2010 7:35 pm
Re: Love won't start
I still get the same error message. I tried putting it in a zip[ file and calling it .love but I still get the same message. Currently I've got a folder name LuaGameOne and inside of it I've got a file called main.lua. I thought all I had to do was drag the folder (unzipped) onto the love exe.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Love won't start
Well, that should have worked.
Can you try opening a terminal in that directory and execute
?
Can you try opening a terminal in that directory and execute
Code: Select all
love .
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Love won't start
Hmm.. IIRC it checks for a callback.. can't remember which one though..
EDIT: No actually it checks whether there is either a main.lua or conf.lua.
EDIT: No actually it checks whether there is either a main.lua or conf.lua.
Who is online
Users browsing this forum: No registered users and 7 guests