[NEED HELP] Have main game-mode script work in a filterscript
#8

Quote:
Originally Posted by nG Inverse
Посмотреть сообщение
If an invalid index is passed to the function it could cause an out-of-bound error, which can lead to incorrect return values or even crashes. So you should check that the index passed is valid before accessing the array.
pawn Код:
forward IsPlayerGod(TargetID);
public IsPlayerGod(TargetID) {
   if(0 <= TargetID < MAX_PLAYERS) {
      return godmode[TargetID];
   }
   return -1;
}
actually. It srtill does not work for me, maybe im doing something wrong?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)