When I play the scene with the rotation animation it all runs, but when I change scene and then come back to the previous scene it gives me the following error on the terminal:
Users/Marco/Desktop/LOSTBird/level6.lua:175: attempt to perform arithmetic on field ‘rotation’ (a nil value)
stack traceback:
[C]: ?
/Users/Marco/Desktop/LOSTBird/level6.lua:175: in function </Users/Marco/Desktop/LOSTBird/level6.lua:174>
?: in function <?:229>
2013-04-01 21:33:04.967 Corona Simulator[49858:f03] Runtime error
Her’s the code of the animation:
local function rotate(event)
arm4.rotation = arm4.rotation +20
end
Runtime:addEventListener(“enterFrame”, rotate)
Thanks