I'm new on LÖVE, I just started using it for my online courses. I'm trying to seek help here please, I'm pretty sure the solution to my probleme is pretty dumb but like I said, I just began using it and I'm not acquainted with it yet. So here's the code I'm trying to launch :
Code: Select all
-- Ligne de code pour check le debug---
io.stdout:setvbuf('no')
local Lander = {}
Lander.x = 0
Lander.y = 0
Lander.angle = -90
Lander.vx = 0
Lander.vy = 0
Lander.img = love.graphics.newImage("images/ship.png")
function love.load()
largeur = love.graphics.getWidth()
hauteur = love.graphics.getHeight()
Lander.x = largeur/2
Lander.y = hauteur/2
end
function load.update(dt)
end
function load.draw()
love.graphics.draw(Lander.img, Lander.x, Lander.y, math.rad(Lander.angle), 1, 1, Lander.img:getWidth()/2, Lander.img:getHeight()/2)
end
Which I actually dont really understand. I'd be grateful for some helpError
main.lua:20: attempt to index global 'load' (a function value)
Traceback
main.lua:20: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'