PDA

View Full Version : Fall to dead causes server crash



Ni3ls
4th July 2014, 12:44
Hi all,

Im working on a zombie mod with saving. Everything loads and saves perfectly. However, if I fall to dead (jump from a too high object) the server crashes and says my values are undefined. I can kill, get killed, do suicide, the mod works perfectly. But when I fall to dead it says thats it undefined. And not 1 thing, but all.

checkachievements()
{
if(self.rank >= 1 && self.rank5ach==0 )
{
text=&"BEGINNER";
self thread add_achievement(text);
self.rank5ach=1;
}

if(self.rank >= 20 && self.rank20ach==0 )
{
text=&"ZOMBIDICAL MANIAC";
self thread add_achievement(text);
self.rank20ach=1;
}
}


I got a hud that shows the correct rank. I also get the message when I get the achievement. It's called from Callback_Playerkilled();
But when I fall to death, it says
pair 'undefined' and '1' has unmatching types 'undefined' and 'int' But it works because I got the message when I reach rank 1. Who can help me?

serthy
4th July 2014, 13:16
When falling to death the attacker or eAttacker is the string "world" and not an entity.
If you call checkachievements() on attacker self.rank is undefined.