TextDraw problem...
#6

This part of code will crash your script when players kill themself because if they /kill or whatever that kill themself, killerid is set to INVALID_PLAYER_ID, which is defined 255 so will produce an out of memory bounds error as you try to modify an inexisting memory address (killer[255])

fix:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  killed[playerid]++;
  if (killerid != INVALID_PLAYER_ID)
    killer[killerid]++;
  return 1;
}
Reply


Messages In This Thread
TextDraw problem... - by robanswe - 21.02.2009, 16:06
Re: TextDraw problem... - by yom - 21.02.2009, 16:08
Re: TextDraw problem... - by robanswe - 21.02.2009, 16:10
Re: TextDraw problem... - by yom - 21.02.2009, 16:12
Re: TextDraw problem... - by robanswe - 21.02.2009, 16:13
Re: TextDraw problem... - by yom - 21.02.2009, 16:20
Re: TextDraw problem... - by robanswe - 21.02.2009, 16:22

Forum Jump:


Users browsing this thread: 1 Guest(s)