[14:09:560] Script exception: Null pointer access : main : void critter_dead(Critter&inout, Critter@) : 5474, 3 : FOServer::KillCritter : Npc (5002122).
[14:09:560] Execution of script stopped due to exception.
[14:09:560] Context<FOServer::KillCritter : Npc (5002122)>, state<Exception>, call stack<1>:
[14:09:560] 0) main : void critter_dead(Critter&inout, Critter@) : 5474, 3.
My path
void critter_dead(Critter& cr, Critter@ killer)
............................................
// npc
if(cr.IsNpc() && killer.IsPlayer() )
{
// Добавляет в стек игрока. Было Clear NPC memory about enemies after it dies.
cr.AddEnemyInStack(killer.Id);
}
else // players
NPC with 5002122 ID have 1 player in enemy stack?
Is it something wrong in critter_dead working?
How to disable that callbacks or fix it?