So i'm trying to make zone attack system, and the problem is, that i getting this error:
Script code
Code:
C:\Users\Vartotojas\Desktop\ERSG\gamemodes\RSAG.pwn(29152) : error 028: invalid subscript (not an array or too many subscripts): "specialybe"
C:\Users\Vartotojas\Desktop\ERSG\gamemodes\RSAG.pwn(29152) : warning 215: expression has no effect
C:\Users\Vartotojas\Desktop\ERSG\gamemodes\RSAG.pwn(29152) : error 001: expected token: ";", but found "]"
C:\Users\Vartotojas\Desktop\ERSG\gamemodes\RSAG.pwn(29152) : error 029: invalid expression, assumed zero
C:\Users\Vartotojas\Desktop\ERSG\gamemodes\RSAG.pwn(29152) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Script code
Code:
stock CountPlayersInTeams(TeamID){
new PlayersInTeam;
for(new i = 0; i < MAX_PLAYERS; i++){
if(specialybe[i] == TeamID) PlayersInTeam++;
}
return PlayersInTeam;
}
stock CountPlayersInZone(TeamID,ZoneID){
new PlayersInZone;
if(TeamID == cosanostragauja){
for(new i; i < MAX_PLAYERS; i++){
if(specialybe[i] == cosanostragauja && IsPlayerInZone(i,m_zones_info[ZoneID][0],m_zones_info[ZoneID][1],m_zones_info[ZoneID][2],m_zones_info[ZoneID][3])) PlayersInZone++;
}
}
if(TeamID == Immortal){
for(new i; i < MAX_PLAYERS; i++){
if(specialybe[i] == Immortal && IsPlayerInZone(i,m_zones_info[ZoneID][0],m_zones_info[ZoneID][1],m_zones_info[ZoneID][2],m_zones_info[ZoneID][3])) PlayersInZone++;
}
}
return PlayersInZone;
}