Can't launch love 2d

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Cffex
Prole
Posts: 1
Joined: Fri Jul 30, 2021 7:37 am

Can't launch love 2d

Post by Cffex »

I'm new to love 2d, so I've read the getting started page and they said make a folder that has a main.lua in it and drag that folder onto love 2d shortcut when I try to drag it getting this error: https://love2d.org/forums/download/file ... w&id=20021
also the main.lua is a document file open with note pad
Attachments
error.PNG
error.PNG (20.46 KiB) Viewed 5719 times
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Can't launch love 2d

Post by GVovkiv »

Since you new, you, probably, don't want to deal with thing like that, so you can try zerobrane
https://studio.zerobrane.com/
Install it, open, in upper bar choose Project-->Lua Interpreter-->Love
(If you install love in default folder, now you don't need do anything else)
And now you ready to work
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Can't launch love 2d

Post by ReFreezed »

Create a file called "whatever.cmd" next to your main.lua with this line in it:

"C:\Program Files\LOVE\lovec.exe" .

(Change the directory if you've installed LÖVE elsewhere.)
Now you can run the game by running whatever.cmd .

(Installing ZeroBrane will do nothing but complicate things.)
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Can't launch love 2d

Post by GVovkiv »

ReFreezed wrote: Fri Jul 30, 2021 6:01 pm (Installing ZeroBrane will do nothing but complicate things.)
Yeah, better to use some notepad++, add some cmd files or lauch options(hi NppExec), which doesn't even support function list, doesn't have auto-completion and other stuff for lua without using plugings, but even if you find them:
"Oh, hey, nice plugin, it add auto-completion for love!
Oh... it was updated 3 years ago and support love 10"
Or using some notepad.exe and bat files
Or run love through cmd window itself

Yeah, all that methods better, especially when you new to something, in that case, to love

Better, that:
Install Zerobrane
Open it
Switch interprier to "Love" which i mention earlier
Create or open folder with main.lua
Press f6 to lauch it anytime
Ejoy using nice lua and love IDE with love auto-completion, function list, syntax highlight, in-app console, function description and other out-of-box

Yeah, very complicated
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Can't launch love 2d

Post by ReFreezed »

@GVovkiv
I'd say making a file and copy-pasting one short line of text in it is less complicated than installing and learning a completely new program. I'm not saying using something other than Notepad is bad - it's just overkill to solve this simple problem of "how do I run the game".
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Can't launch love 2d

Post by GVovkiv »

ReFreezed wrote: Fri Jul 30, 2021 6:58 pm @GVovkiv
I'd say making a file and copy-pasting one short line of text in it is less complicated than installing and learning a completely new program. I'm not saying using something other than Notepad is bad - it's just overkill to solve this simple problem of "how do I run the game".
Nope
In that case, it's only for better
From what i can guess, OP kinda new to programming and love itself
(Since i don't see any real reason, why op using notepad for editing)
So it be more beneficial for OP to learn nice IDE and lua\love in both time

I don't think suffering with notepad + bat file it's less complicated, then using IDE
User avatar
zorg
Party member
Posts: 3435
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Can't launch love 2d

Post by zorg »

GVovkiv wrote: Fri Jul 30, 2021 7:07 pm
ReFreezed wrote: Fri Jul 30, 2021 6:58 pm @GVovkiv
I'd say making a file and copy-pasting one short line of text in it is less complicated than installing and learning a completely new program. I'm not saying using something other than Notepad is bad - it's just overkill to solve this simple problem of "how do I run the game".
Nope
In that case, it's only for better
From what i can guess, OP kinda new to programming and love itself
(Since i don't see any real reason, why op using notepad for editing)
So it be more beneficial for OP to learn nice IDE and lua\love in both time

I don't think suffering with notepad + bat file it's less complicated, then using IDE
Unless, *gasp* they don't need one? Besides, that wasn't the original question either.

If the OP dragged the folder with main.lua inside, even if it was empty, a black screen would be showing instead of that error.
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
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: Can't launch love 2d

Post by GVovkiv »

Unless, *gasp* they don't need one? Besides, that wasn't the original question either.

If the OP dragged the folder with main.lua inside, even if it was empty, a black screen would be showing instead of that error.
Or unless *gasp* they don't know about, for example, love and more specific lua IDE, which may make life with it easer?
And maybe it's reason why they ask that question?
Sometimes, people try do deal with wrong problems in wrong way, and it looks like that is one of them
User avatar
pgimeno
Party member
Posts: 3541
Joined: Sun Oct 18, 2015 2:58 pm

Re: Can't launch love 2d

Post by pgimeno »

FWIW I only get that error when neither main.lua nor conf.lua are in the folder that I pass to love.

Code: Select all

$ love11 .
Error: [string "boot.lua"]:575: No code to run
Your game might be packaged incorrectly.
Make sure main.lua is at the top level of the zip.
stack traceback:
	[string "boot.lua"]:777: in function <[string "boot.lua"]:773>
	[C]: in function 'error'
	[string "boot.lua"]:575: in function <[string "boot.lua"]:380>
	[C]: in function 'xpcall'
	[string "boot.lua"]:787: in function <[string "boot.lua"]:780>
	[C]: in function 'xpcall'
$ 
It appears to me that the OP must have made a mistake somehow. Like creating a folder in the same folder as main.lua and passing that one instead of the one that contains it.
Post Reply

Who is online

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