Loading Images
Posted: Fri Mar 19, 2010 12:52 am
function love.load()
pic1 = love.graphics.newImage(pic1.bmp)
end
function love.draw()
love.graphics.draw(pic1, 50, 50, 0, 0, 0, 0, 0)
end
the above is my code but it just gives me this erro:
Error
main.lua.7 attempt to index global 'pic1' a nil value
Traceback:
manin.lua.7: in function 'load'
[C:] in function 'xpcall'
pic1 = love.graphics.newImage(pic1.bmp)
end
function love.draw()
love.graphics.draw(pic1, 50, 50, 0, 0, 0, 0, 0)
end
the above is my code but it just gives me this erro:
Error
main.lua.7 attempt to index global 'pic1' a nil value
Traceback:
manin.lua.7: in function 'load'
[C:] in function 'xpcall'