Main.lua load error

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
Darlex
Party member
Posts: 128
Joined: Sun Sep 24, 2017 10:02 am
Location: Chile
Contact:

Main.lua load error

Post by Darlex »

Hello!
again...
When i tried to load any "main.lua" file throws an error:
Error

boot.lua:481: Cannot load game at path 'C:/gamedata/main.lua'.
Make sure a folder exists at the specified path.


Traceback

[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
But when i tried to load a game.love file, IT WORKS
But it is annoying to have to compress the file again and again
Somebody can help me?
PLEASE?

Note
: Im now using win10 (Yeah, it sucks)
Hi! I wish you have an amazing day!
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Main.lua load error

Post by zorg »

The simplest questions first;
Have you made sure the file exists in the location the error message indicates?
How are you trying to load your project? commandline? zerobrane?
You are loading the folder and not the main.lua file, right?
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
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: Main.lua load error

Post by pgimeno »

zorg wrote: Sun Jun 10, 2018 5:23 am You are loading the folder and not the main.lua file, right?
Especially this.

I get an error like that too when I invoke LÖVE like this: love11 main.lua

You need to invoke LÖVE with a folder, not with a file, e.g. love11 . (the . means the current folder). Or love11 /home/user/src/love/mygame/ (you don't need the final slash). In your case it seems like it would be: love11 c:/gamedata/ and that's it. Note my LÖVE 11.1 executable is called love11, so you may need to use love without 11 instead.

Note that the error message talks about the *path* c:/gamedata/main.lua and says that you should make sure there's a *folder* in that path, so it's interpreting main.lua as a folder. The main file is always called main.lua, you don't need to specify it; you need to *omit* it specifically.
Darlex
Party member
Posts: 128
Joined: Sun Sep 24, 2017 10:02 am
Location: Chile
Contact:

Re: Main.lua load error

Post by Darlex »

zorg wrote: Sun Jun 10, 2018 5:23 am You are loading the folder and not the main.lua file, right?
No, im loading the file, No the folder
zorg wrote: Sun Jun 10, 2018 5:23 am Have you made sure the file exists in the location the error message indicates?
Yup!
zorg wrote: Sun Jun 10, 2018 5:23 am How are you trying to load your project? commandline? zerobrane?
im just clicking the "main.lua" file........
Hi! I wish you have an amazing day!
Darlex
Party member
Posts: 128
Joined: Sun Sep 24, 2017 10:02 am
Location: Chile
Contact:

Re: Main.lua load error

Post by Darlex »

pgimeno wrote: Sun Jun 10, 2018 7:50 am
zorg wrote: Sun Jun 10, 2018 5:23 am You are loading the folder and not the main.lua file, right?
Especially this.

I get an error like that too when I invoke LÖVE like this: love11 main.lua

You need to invoke LÖVE with a folder, not with a file, e.g. love11 . (the . means the current folder). Or love11 /home/user/src/love/mygame/ (you don't need the final slash). In your case it seems like it would be: love11 c:/gamedata/ and that's it. Note my LÖVE 11.1 executable is called love11, so you may need to use love without 11 instead.

Note that the error message talks about the *path* c:/gamedata/main.lua and says that you should make sure there's a *folder* in that path, so it's interpreting main.lua as a folder. The main file is always called main.lua, you don't need to specify it; you need to *omit* it specifically.
OOOOOOOOOOOOOOH
Thanks! It worked!
Hi! I wish you have an amazing day!
Post Reply

Who is online

Users browsing this forum: No registered users and 71 guests