I can't load images.
Posted: Wed May 24, 2017 7:23 pm
Hello! I am currently having a problem with my first script. I am trying to load an image, but it returns this error:
This is my code:
How can I solve this? Thank you.
Code: Select all
main.lua:10 bad argument #1 to 'draw' (Drawable expected, got nil)
Code: Select all
function love.load()
local me = love.graphics.newImage("me.png")
end
function love.draw()
local defaultx = 348
local defaulty = 300
local x = 348
local y = 600
love.graphics.print("Hello World!", x, y)
love.graphics.draw(me, defaultx, defaulty)
end