Why is my image
equal to nil
here?
local image = new gfx.image.new(32, 32)
if image == nil then
error("Failed to create image") -- Handle errors in case image creation fails
end
gfx.pushContext(image)
gfx.drawRect(8, 8, 16, 16)
gfx.popContext()
There are no other sprites, I'm not doing anything excessive with memory.