I always get this error code
Posted: Wed May 01, 2024 12:11 am
So, when i try to do some movment i always get the error saying that squarex,squarey or squarespeed is equivalent to nil.
here my code:
If someone can help me out thanks! 
here my code:
Code: Select all
local square = {
squarex = 0,
squarey = 0 ,
squarespeed = 100
}
function love.draw()
love.graphics.setColor(0,0,1)
love.graphics.rectangle('fill',square.squarex,square.squarey,50,60)
end
function love.update(dt)
if love.keyboard.isDown('right') then
squarex = squarex + square * dt
end
end
