0
I’m having a problem with a code in Lua with LOVE2D. I’m trying to recreate the "game of the little snake" and I have a problem with the setupScreen function in love.load The code is like this:
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
VIRTUAL_WIDTH = 432
VIRTUAL_HEIGHT = 243
function love.load()
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT {
fullscreen = false,
resizable = true,
vsync = true
})
I’ve used the same code before and never had problems, but now when I run with love appears: main.lua.29: Attempt to call global 'WINDOW_HEIGHT' (a number value)
In the editor, for some reason, the 'WINDOW_HEIGHT' is the same color 'setupscreen' of the same line (line 7 in this question). Please, if anyone could help, I would be most grateful!
This code does not compile. Missing
end
. With that fixed, there’s this mistake:attempt to index global 'push'
.– lhf