Noob help, can't run .lua file

General discussion about LÖVE, Lua, game development, puns, and unicorns.
WolfMan11
Prole
Posts: 2
Joined: Thu Nov 06, 2014 7:22 pm

Noob help, can't run .lua file

Post 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.
caldur
Prole
Posts: 20
Joined: Tue Mar 13, 2012 3:30 pm

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

Post 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
User avatar
Ortimh
Citizen
Posts: 90
Joined: Tue Sep 09, 2014 5:07 am
Location: Indonesia

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

Post 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.
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post by zorg »

It does support plain ZIPs as well.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
WolfMan11
Prole
Posts: 2
Joined: Thu Nov 06, 2014 7:22 pm

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

Post 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.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

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

Post 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
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post 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.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

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

Post by Nixola »

That doesn't explain why it can't run 7z files on my PC though, since I've got 7zip installed
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
caldur
Prole
Posts: 20
Joined: Tue Mar 13, 2012 3:30 pm

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

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

Who is online

Users browsing this forum: No registered users and 104 guests