I get a wierd error i havent seen anywhere
Posted: Wed Jul 27, 2022 12:30 pm
so this is my code:
function love.load()
love.window.setMode(1920, 1080, {resizable=false, fullscreen=true, vsync=false, minwidth=1920, minheight=1080})
harmony = {}
harmony.sprite = love.image.newImageData("Sprites/Harmony.png")
harmony.bg = love.image.newImageData("Sprites/HarmonyBg.png")
end
function love.update(dt)
if love.keyboard.isDown("escape") then
love.event.quit()
end
end
function love.draw()
love.graphics.draw(harmony.bg, 0, 0)
love.graphics.draw(harmony.sprite, 860, -920)
end
i have been getting this error message:
main.lua:15: bad argument #1 to 'draw' (Drawable expected, got ImageData)
Can somebody help me? i am stuck!
function love.load()
love.window.setMode(1920, 1080, {resizable=false, fullscreen=true, vsync=false, minwidth=1920, minheight=1080})
harmony = {}
harmony.sprite = love.image.newImageData("Sprites/Harmony.png")
harmony.bg = love.image.newImageData("Sprites/HarmonyBg.png")
end
function love.update(dt)
if love.keyboard.isDown("escape") then
love.event.quit()
end
end
function love.draw()
love.graphics.draw(harmony.bg, 0, 0)
love.graphics.draw(harmony.sprite, 860, -920)
end
i have been getting this error message:
main.lua:15: bad argument #1 to 'draw' (Drawable expected, got ImageData)
Can somebody help me? i am stuck!