if(pTazer[playerid] == 0)
C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\myrp.pwn(22124) : error 028: invalid subscript (not an array or too many subscripts): "pTazer" C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\myrp.pwn(22124) : warning 215: expression has no effect C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\myrp.pwn(22124) : error 001: expected token: ";", but found "]" C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\myrp.pwn(22124) : error 029: invalid expression, assumed zero C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\myrp.pwn(22124) : fatal error 107: too many error messages on one line
if(PlayerInfo[playerid][pTazer] == 0)
if(strcmp(subcmd, "taser", true) ==0 || strcmp(subcmd, "t", true) ==0)
{
// We make it again for TEAM_COPS
if(gTeam[playerid] == FACT_COPS_LS) // For cops
{
if(!OnDuty[playerid])
{SendClientMessage(playerid, COLOR_COPS, "{FF6600}[Police]{11BB00} Vous n'кtes pas en service."); return 1;}
if(PlayerInfo[playerid][pTazer] == 0) // If the player has no tazer withdrawn.
{
SafeGivePlayerWeapon(playerid, 23, 20); // Gives a SD.
pTazer[playerid] = 1; // Sets the var to true.
format(proxy_msg, sizeof(proxy_msg), "%s sort son taser de son hostler et l'arme.", playername);
ProxDetector(30.0, playerid, string, COLOR_ACTION,COLOR_ACTION,COLOR_ACTION,COLOR_ACTION,COLOR_ACTION);
return 1;
}
else ifif(PlayerInfo[playerid][pTazer] == 1) // If the player has the tazer withdrawn to holster it.
{
SafeGivePlayerWeapon(playerid, 24, 100); // Gives a deagle.
pTazer[playerid] = 0; // Sets the var to false.
format(proxy_msg, sizeof(proxy_msg), "%s dйsarme son taser et le replace а son hostler.", playername);
ProxDetector(30.0, playerid, string, COLOR_ACTION,COLOR_ACTION,COLOR_ACTION,COLOR_ACTION,COLOR_ACTION);
return 1;
}
}
return 1;
}
I use this, exactly : https://sampforum.blast.hk/showthread.php?tid=272548
I changed with the code you gave me, I got exactly the same errors actually |
I need to #define it ?
If yes, I didn't do that. If not, you mean "new ..." ? |
new pTazer[MAX_PLAYERS];
C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\lairp.pwn(1696) : error 021: symbol already defined: "pTazer" C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\lairp.pwn(22122) : error 028: invalid subscript (not an array or too many subscripts): "gTeam" C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\lairp.pwn(22122) : warning 215: expression has no effect C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\lairp.pwn(22122) : error 001: expected token: ";", but found "]" C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\lairp.pwn(22122) : error 029: invalid expression, assumed zero C:\Users\Geo\Desktop\Ca marche\a jour\gamemodes\lairp.pwn(22122) : fatal error 107: too many error messages on one line
new pTazer;
new gTeam;
gTeam[playerid]
new gTeam[MAX_PLAYERS];