Page 1 of 2

Noob help, can't run .lua file

Posted: Thu Nov 06, 2014 7:26 pm
by WolfMan11
I have downloaded Love, and have made the Hello World .lua file, I have put that in a folder but no matter what i do i can't run it. I thought you could run it withouT making a .love file, could some one please explain it to. I have read the wiki and tried external sources. I am using OSX running Yosemite 10.10.

Re: Noob help, can't run .lua file

Posted: Fri Nov 07, 2014 2:24 am
by caldur
make sure you have an entry point named "main.lua" which is inside a folder that is on the same level as the love executable.
So just rename your hello world.lua into main.lua

Re: Noob help, can't run .lua file

Posted: Fri Nov 07, 2014 4:39 am
by Ortimh
Or main.lua that run your hello world code. If you pack your code into an archive, make sure you pack with Zip format and rename your archive extension to .love because currently LÖVE doesn't support another format to archive.

Re: Noob help, can't run .lua file

Posted: Fri Nov 07, 2014 5:35 am
by zorg
It does support plain ZIPs as well.

Re: Noob help, can't run .lua file

Posted: Fri Nov 07, 2014 4:37 pm
by WolfMan11
I got it to work. I had to drag the folder into finder in the applications folder then onto the Love app. Before I was dragging it onto the love app on the dock. I thought it would be the same thing. Thank you guys.

Re: Noob help, can't run .lua file

Posted: Sat Nov 08, 2014 12:11 pm
by Positive07
zorg wrote:It does support plain ZIPs as well.
And plain 7z too... or a love file compressed with 7zip, or a folder... I have once thrown an .exe too hahaha it was a game already packaged with LÖVE but I wanted to run other version of LÖVE so I just dragged it to the Löve icon and it worked

Re: Noob help, can't run .lua file

Posted: Sat Nov 08, 2014 1:44 pm
by Nixola
It supports .zips and folders on every system, but don't ever assume that .7z, .rar or other files will work on other PCs. Those only work on some, I don't know why, probably Bartbes or the other developers can tell.

Re: Noob help, can't run .lua file

Posted: Sat Nov 08, 2014 2:25 pm
by zorg
The reason is that reasonably, most reasonable OSes have unzipping utilities installed by default, whereas rar is (i think) proprietary (the compressor part at least, but still, some os-es don't give you unrar out-of-the-box), and 7z needs its own decompressor that's not included on most OS-es by default as well.

Re: Noob help, can't run .lua file

Posted: Sat Nov 08, 2014 2:31 pm
by Nixola
That doesn't explain why it can't run 7z files on my PC though, since I've got 7zip installed

Re: Noob help, can't run .lua file

Posted: Mon Nov 10, 2014 9:34 am
by caldur
the unzipping I believe is provided by physfs which in turn uses zlib. It does not rely on external utilities to handle archived files.