Help gang system

Krc

Active member
Joined
Mar 30, 2018
Messages
193
Reaction score
25
Location
Lithuania
So i'm trying to make zone attack system, and the problem is, that i getting this error: 
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;
}
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,125
Reaction score
149
the first warning is about "specialybe" but there's no definition of it shown in the script, is "specialybe" a function or something? That would explain why it can't be accessed like an array using "[]"
 
Top