Symbol is never used ForbiddenWeapons
#1

Hello,

That's my code
PHP код:
new 0;
   while(
< (sizeofForbiddenWeapons)))
   {
     if(
GetPlayerWeapon(playerid) == w)
   {
     
GetPlayerName(playeridpnameMAX_PLAYER_NAME);
     
format(stringsizeof(string), "{FF0000}[ANTI-CHEAT]: * %s has been banned by the anti cheat - Reason: Weapon hack");
     
SendClientMessageToAll(-1string);
     
BanEx(playerid"Weapon Hack");
   }
   }
  }
  return 
1;

Like u see i used forbidden weapons.
new ForbiddenWeapons[][] =
{
36,
35,
};


Why does it says that ?
Reply
#2

pawn Код:
if(GetPlayerWeapon(playerid) == ForbiddenWeapons[w])
Reply
#3

PHP код:
C:\Users\yan\Desktop\Los santos gang wars LSGW\filterscripts\AntiCheat.pwn(22) : error 029invalid expressionassumed zero
C
:\Users\yan\Desktop\Los santos gang wars LSGW\filterscripts\AntiCheat.pwn(22) : error 008must be a constant expressionassumed zero
C
:\Users\yan\Desktop\Los santos gang wars LSGW\filterscripts\AntiCheat.pwn(151) : error 033: array must be indexed (variable "ForbiddenWeapons")
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


3 Errors

Reply
#4

Remove the second dimension of the array, as well as the comma behind the last value.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
Remove the second dimension of the array, as well as the comma behind the last value.
I REALLY got no idea what you said now. Could you explain better, My English is not the best - I have no idea what deminesion is
Reply
#6

PHP код:
new 0;
   while(
< (sizeofForbiddenWeapons)))
   {
     if(
GetPlayerWeapon(playerid) == w)
   {
     
GetPlayerName(playeridpnameMAX_PLAYER_NAME);
     
format(stringsizeof(string), "{FF0000}[ANTI-CHEAT]: * %s has been banned by the anti cheat - Reason: Weapon hack");
     
SendClientMessageToAll(-1string);
     
BanEx(playerid"Weapon Hack");
   }
   }
  }
  return 
1;

PHP код:
new ForbiddenWeapons[2] =
{
  
36,
  
35
}; 
Reply
#7

Fixed by my self.

Thanks for the help tho.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)