tutorial question
Posted: Sat Feb 07, 2015 7:05 pm
Hi,
on a different topic
getting through the tutorial, and the program returns an error (attempting to perform a numerical operation on player.x). Why is that?
on a different topic
getting through the tutorial, and the program returns an error (attempting to perform a numerical operation on player.x). Why is that?
Code: Select all
player = {x = 200, y = 710, speed = 150, img = nil}
function love.load(arg)
player = love.graphics.newImage('assets/ship.png')
end
function love.update(dt)
if love.keyboard.isDown('escape') then
love.event.push('quit')
end
if love.keyboard.isDown('left') then
player.x = player.x - (player.speed*dt)
end
end
function love.draw(dt)
love.graphics.draw (player, 100,100)
end