How is this working?

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
ayla
Prole
Posts: 5
Joined: Sun Jan 08, 2012 6:01 pm

How is this working?

Post 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
User avatar
Kadoba
Party member
Posts: 399
Joined: Mon Jan 10, 2011 8:25 am
Location: Oklahoma

Re: How is this working?

Post 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
ayla
Prole
Posts: 5
Joined: Sun Jan 08, 2012 6:01 pm

Re: How is this working?

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

Re: How is this working?

Post by Robin »

Are you Dutch? If you like, I can explain things in Dutch.
Help us help you: attach a .love.
Post Reply

Who is online

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