I created a directory Chicken which includes two files (main.lua, conf.lua) and an image Chicken.jpg.
However, after I copied some codes from the tutorial and typed a command line in cmd.exe to run the game, an error showed up:
Code: Select all
Error
main.lua:2: attempt to call field 'newImage' (a nil value)
Traceback
main.lua:2: in function 'load'
[C]:in function 'xpcall'
Code: Select all
function love.load()
chicken = love.graphics.newImange("Chicken.jpg")
local f = love.graphics.newFont(12)
love.graphics.setFont(f)
love.graphics.setColor(0,0,0,255)
love.graphics.setBackgroundColor(255,255,255)
end
where should I place the Chicken.jpg and how to load it?