Code: Select all
function love.load()
x = 0
y = 0
mv = 10
slime = love.graphics.newImage("frame_up.png")
end
function love.draw()
love.graphics.draw("slime", x, y)
end
function love.update()
if x > 600 then
x = x - mv
end
if y > 400 then
y = y - mv
end
if x < 0 then
x = x + mv
end
if y < 0 then
y = y + mv
end
if love.keyboard.isDown("d") then
x = x + mv
end
if love.keyboard.isDown("s") then
y = y + mv
end
if love.keyboard.isDown("a") then
x = x - mv
end
if love.keyboard.isDown("w") then
y = y - mv
end
end
it gives me this error
main.lua:5: Could not open file frame_up.png. Does not exist.
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'newImage'
main.lua:5: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'