4

I'm trying to open a game with Love2D and the following error occurs:

Error

boot.lua:577: Cannot load game at path '/home/panali/Desktop/Lua.love/main.lua'. Make sure a folder exists at the specified path.

Traceback

[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

Can anyone help me and tell me what am I doing wrong?

  • the error is pretty self-explainatory. "make sure a folder exists at the specified path". did you make sure it exists? Are you using Linux? – Piglet May 19 '20 at 16:23
  • Yes I'm using linux ubuntu 20.04 and the folder already exists –  May 19 '20 at 16:25
  • did you try to provide the path without the filename main.lua? in the examples the only provide a path. .love is the ending for packaged love games is it not? you use that as a folder? – Piglet May 19 '20 at 16:29
  • Yes i tried that too! –  May 19 '20 at 16:30
  • 1
    adding to your post what you have tried would save us both time ;) – Piglet May 19 '20 at 16:31
  • so you have a `/home/panali/Desktop/Lua.love/main.lua` and you run `love /home/panali/Desktop/Lua.love/` ? Did you try to not have a . in your folder name? – Piglet May 19 '20 at 16:36
  • 1
    What is the output of `ls -l /home/panali/Desktop/Lua.love/main.lua` – Egor Skriptunoff May 19 '20 at 18:52

6 Answers6

8

had the same issue, resolved this by pointing folder instead filename:

love ./

instead of

love main.lua
user3549043
  • 109
  • 1
  • 3
3

You can try to open the folder instead of lua file

Z Jiang
  • 31
  • 2
1

I dont know if you're still looking at this, the error is that you cant open a main.lua directly, it has to be in a folder.

0

you can't just give the location of the file, you need to give to location of the folder. try putting main.lua inside a folder and then run the folder.

freeve4h
  • 75
  • 1
  • 7
0

If you drag the folder to the love icon instead of dragging the main.lua file to the love icon it works.

4b0
  • 21,981
  • 30
  • 95
  • 142
  • An answer is not a really good place to ask a related question (most likely noone is going to respond, or if someone will, it will be considered off-topic). I recommend you to ask it as a new question (after doing some research, chances are it was already asked and answered before) – vmatyi Jun 16 '22 at 14:13
-1

The folder cant have a space in it. It took me an hour to find this out myself.

  • The question tells you the path the asker tried, and it already doesn't contain a space. – Joseph Sible-Reinstate Monica Jan 26 '22 at 07:40
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 26 '22 at 21:05