Does it matter if I get these warnings?

Does it matter (functionality or performance wise) if I get these in my game?  That game seems to work fine, just haven’t quite got the coding exact in terms from trying to create a particle type that’s already there etc.

 !!! Particles.CreateParticleType(): PARTICLE TYPE ‘Starfield’ NOT CREATED - (ALREADY EXISTS)! NAME MUST BE UNIQUE.

 !!! Particles.StopEmitter(): EMITTER ‘StarfieldlevelEffect’ NOT FOUND!

 !!! Particles.DeleteEmitter(): COULD NOT DELETE EMITTER ‘StarfieldlevelEffect’ (NOT FOUND)

Well, although your game seems to work, those warnings have a reason, so you should get rid of them.

The first message appears if you try to create a particle type using a particle type name that has already been used for another particle type. You should either change the particle type’s name to a unique one or just use the particle type you already created. You’re probably trying to create the same particle type twice. This may happen on a level start if you did not remove any previously created particle stuff before.

The other messages are generated if you try to access an emitter by name which does not exist (anymore). Make sure you are using the correct name here and that your emitter has not been deleted. If you are using a scene manager (Storyboard etc.), make sure that you remove all your particle stuff manually BEFORE switching from one scene to another. Otherwise, the scene manager will purge them for you, therefore Particle Candy is not aware that those objects do not longer exist and can’t find them anymore.

ok thanks - I was just wondering the issues themselves would not be urgent to fix or not.  I guess checking in case your response might have be “oh you need to fix that asap as you’ll be leaking memory” :slight_smile:   

There could indeed be a memory leak if you do not remove particle stuff properly using the appropriate Particle Candy commands *before* switching scenes. Generally, particle stuff (existing particles, emitters) should be removed using the Particle Candy commands. You can do so by calling CleanUp() before switching scenes (or on game over), for example.

Well, although your game seems to work, those warnings have a reason, so you should get rid of them.

The first message appears if you try to create a particle type using a particle type name that has already been used for another particle type. You should either change the particle type’s name to a unique one or just use the particle type you already created. You’re probably trying to create the same particle type twice. This may happen on a level start if you did not remove any previously created particle stuff before.

The other messages are generated if you try to access an emitter by name which does not exist (anymore). Make sure you are using the correct name here and that your emitter has not been deleted. If you are using a scene manager (Storyboard etc.), make sure that you remove all your particle stuff manually BEFORE switching from one scene to another. Otherwise, the scene manager will purge them for you, therefore Particle Candy is not aware that those objects do not longer exist and can’t find them anymore.

ok thanks - I was just wondering the issues themselves would not be urgent to fix or not.  I guess checking in case your response might have be “oh you need to fix that asap as you’ll be leaking memory” :slight_smile:   

There could indeed be a memory leak if you do not remove particle stuff properly using the appropriate Particle Candy commands *before* switching scenes. Generally, particle stuff (existing particles, emitters) should be removed using the Particle Candy commands. You can do so by calling CleanUp() before switching scenes (or on game over), for example.