03.12.2018, 13:28
(
Последний раз редактировалось Gusteakas; 03.12.2018 в 14:29.
)
Hiya,
I've created taxi actors. Whenever the actor's timer has passed, I want to destroy it. I did some debugging, and I can't figure it out what is wrong. After gettime() > TaxiClientTimer is positive, then it should be removed and it prints every single message but server crashes after the printf("Finished %d", i); What can couse the problem? This code is in a timer which ticks every second.
SOLVED: I was using Iter_Remove inside foreach loop. Right thing to do is to use Iter_SafeRemove instead.
I've created taxi actors. Whenever the actor's timer has passed, I want to destroy it. I did some debugging, and I can't figure it out what is wrong. After gettime() > TaxiClientTimer is positive, then it should be removed and it prints every single message but server crashes after the printf("Finished %d", i); What can couse the problem? This code is in a timer which ticks every second.
SOLVED: I was using Iter_Remove inside foreach loop. Right thing to do is to use Iter_SafeRemove instead.