Results 1 to 2 of 2

Thread: Fall to dead causes server crash

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    Fall to dead causes server crash

    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.
    PHP Code:
    checkachievements()
    {
        if(
    self.rank >= && self.rank5ach==)
        {
            
    text=&"BEGINNER";
            
    self thread add_achievement(text);
            
    self.rank5ach=1;
        }

        if(
    self.rank >= 20 && self.rank20ach==)
        {
            
    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
    Code:
    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?

  2. #2
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    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.

  3. The Following User Says Thank You to serthy For This Useful Post:

    Ni3ls (4th July 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •