Love won't start

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
CrystalMoth
Prole
Posts: 3
Joined: Wed Mar 17, 2010 7:35 pm

Love won't start

Post by CrystalMoth »

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'
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Love won't start

Post by kikito »

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.
When I write def I mean function.
CrystalMoth
Prole
Posts: 3
Joined: Wed Mar 17, 2010 7:35 pm

Re: Love won't start

Post by CrystalMoth »

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.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Love won't start

Post by Robin »

:? Well, that should have worked.

Can you try opening a terminal in that directory and execute

Code: Select all

love .
?
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Love won't start

Post by bartbes »

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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 150 guests