by EvanBlack » Thu Oct 20, 2011 9:29 pm
Well.. there doesn't appear to be anything wrong with it just by looking at this small piece. More information is needed to know where this code is and how its being called.
By looking it appears to be in an event but the thing is, it looks like every time this is called after the third time it destroys the actor which holds this event..
If you have 3 actors with this event, and all 3 actors call this event 1 time, then all actors with this event will be destroyed. Any actors created after that call this event will also be destroyed.
In the event that postac_rycerz_pion.0 is destroyed, you will most likely get a reference to a NULL pointer or just a read error. if this is called anywhere after postac_rycerz_pion.0 is destroyed. But because getclone returns a null actor, i just might always = 0 after postac_rycerz_pion.0 is destroyed so any actors calling this even even if there is an actor postac_rycerz_pion.1 which sila will keep increasing by 1 postac_rycerz_pion.0 doesn't exist so i is always less than 3 so DestroyActor() never gets called.
Thats everything I can say about this segment of code.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!