When I add an emitter to my scene’s group, I’m getting the error below. The error comes when I exit the scene containing the emitter.
I’m calling StartAutoUpdate() in enterScene, and calling StopAutoUpdate() in exitScene (also tried didExitScene with same result).
I’m creating the particle in createScene and adding it to the scene’s group there.
Am I missing something?
–> PARTICLE SYSTEM READY. LET’S ROCK.
–> Particles.CreateEmitter(): ADDED EMITTER ‘tutu’
–> Particles.CreateParticleType(): CREATED PARTICLE TYPE ‘FireParticles’.
–> Particles.CreateParticleType(): CREATED PARTICLE TYPE ‘SparkParticles’.
–> Particles.CreateParticleType(): CREATED PARTICLE TYPE ‘SmokeParticles’.
–> Particles.AddParticleType(): ADDED PARTICLE TYPE ‘FireParticles’ TO EMITTER
‘tutu’.
–> Particles.AddParticleType(): ADDED PARTICLE TYPE ‘SparkParticles’ TO EMITTER
‘tutu’.
–> Particles.AddParticleType(): ADDED PARTICLE TYPE ‘SmokeParticles’ TO EMITTER
‘tutu’.
–> Particles.StartEmitter(): EMITTER ‘tutu’ STARTED.
–> Particles.StopEmitter(): EMITTER ‘tutu’ STOPPED.
stopped particles
Runtime error
…jects\mygame\trunk\lib\particle_candy.lua:1339: attempt to perform
arithmetic on field ‘x’ (a nil value)
stack traceback:
[C]: ?
…jects\mygame\trunk\lib\particle_candy.lua:1339: in functio
n ‘Update’
…\projects–> Particles.Freeze() - PARTICLE SYSTEM FROZEN.