Page 1 of 1

how to use this function 'newAnimation'

Posted: Tue May 18, 2010 6:25 am
by TonyDwr
Error:
main.lua:22: attempt to call global 'newAnimation' (a nil value)

what's wrong with function newAnimation?

I don't know how to use it.

can anybody help me?

my code:

function love.load()
...
boss_one_1 = love.graphics.newImage("planetfont.png")
line 22: ani = newAnimation(boss_one_1, 32, 32, 0.1, 0)
end

thank you..

Re: how to use this function 'newAnimation'

Posted: Tue May 18, 2010 6:37 am
by nevon
You need to include AnAL first.

Re: how to use this function 'newAnimation'

Posted: Tue May 18, 2010 7:49 am
by TonyDwr
e..how can i include AnAL? ..require(AnAL)?

Re: how to use this function 'newAnimation'

Posted: Tue May 18, 2010 7:50 am
by Robin
TonyDwr wrote:e..how can i include AnAL? ..require(AnAL)?
require("AnAL"), but you have to have AnAL.lua in your game directory (ie next to main.lua) first.

Re: how to use this function 'newAnimation'

Posted: Tue May 18, 2010 8:01 am
by TonyDwr
o , i know how to do it
thank you