Page 1 of 1

How is this working?

Posted: Sun Jan 08, 2012 9:16 pm
by ayla
On both websites http://love2d.org/wiki/Getting_Started http://love2d.org/wiki/Main_Page_(Nederlands)

The way yo have to make a Love file is not quit understandable?

This is what i do i make a file

I make a directory

Code: Select all

mkdir test

Code: Select all

cd test

Code: Select all

gedit main.lua
in that file i write:

Code: Select all

function love.draw()
    love.graphics.print('Hallo Wereld!', 400, 300)
end

Code: Select all

main.lua
from this file a make a zip and give it the name test.zip

then a rename the test.zip file in test.love

When i exequite the file this is waht it say's
Error: [string "boot.lua"]:1: No code to run
Your game might be packaged incorrectly
Make sure main.lua is at the top level of the zip
stack traceback:
[C]: in function 'error'
[string "boot.lua"]:1: in function <[string "boot.lua"]:1>
[C]: in function 'xpcall'

Greating Ayla












from that

Re: How is this working?

Posted: Sun Jan 08, 2012 9:36 pm
by Kadoba
It looks like you took the right steps but it's easy to mistakenly package the directory itself instead of the contents. Open your .zip after you create it and make sure there is only the main.lua file in it and not a folder called 'test'. If that isn't the case then make sure that main.lua is being named right and not something like main.lua.txt

Re: How is this working?

Posted: Sun Jan 08, 2012 10:33 pm
by ayla
Kadoba wrote:It looks like you took the right steps but it's easy to mistakenly package the directory itself instead of the contents. Open your .zip after you create it and make sure there is only the main.lua file in it and not a folder called 'test'. If that isn't the case then make sure that main.lua is being named right and not something like main.lua.txt
Correct that's the way I understands it has to work:

You helped my to look again to the name of the main file there it was that i made a mistake mian.lua

This is what I do and now it works

Code: Select all

ayla@moonos:~/love/test$ zip test.love *
  adding: main.lua (deflated 4%)
ayla@moonos:~/love/test$ 

Thank yo verry much to help me forward with Love _ It is alway good to have LOVE



Gr Ayla

Re: How is this working?

Posted: Mon Jan 09, 2012 11:40 am
by Robin
Are you Dutch? If you like, I can explain things in Dutch.