1

I installed LOVE2D into the program files path, I added it to the environment variables, and I installed LOVE2D Support into Visual studio code. Why are the variable still showing up with the error "Undefined global love"? Can someone help me find an answer? This program does run by drag and drop as wellenter image description here

Edit 1: here is the base code itself. I also want to add that it now runs (still does not register love functions) but its when I press Ctrl+S rather than Alt+L. It also runs the file in the main folder as well rather than the one I want to run, being this one (maybe its because the folder is not the main one selected?) enter image description here

Edit 2: Here is the code instead. I would just like the answer to this question:

function love.load()

    love.window.setTitle("Hello LÖVE")

    love.graphics.setNewFont(24)

end



function love.draw()

    love.graphics.printf("Welcome to LÖVE", 0, love.graphics.getHeight() / 2 , love.graphics.getWidth(), "center")

end
1
  • If you type at a command line love main.lua, does it run? Commented Dec 25, 2023 at 6:40

1 Answer 1

0

To run a love game, you need to indicate only the name of the folder that contains main.lua: love myFolder.

Also, love.exe path must be in the Environment Variables

check here for more details

Sign up to request clarification or add additional context in comments.

1 Comment

Can you copy the relevant info as a quote, inline to the Answer, in case the link becomes broken?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.