new MAXNUMBERTEAMID;
foreach(new i : Player)
{
if(gLogged[i])
{
if(MAXNUMBERTEAMID < PlayerInfo[i][pTeamId] && PlayerInfo[i][pTeamId] > 0) MAXNUMBERTEAMID = PlayerInfo[i][pTeamId];
}
}
new TeamConnected[MAXNUMBERTEAMID+1];// error is here
#define MAX_NUMBERTEAMID 249 //above your code provided.
Try declaring it with a size.
pawn Код:
|
new COUNTMYTEAM,CountOtherTeam[MAX_PLAYERS],MAXINTEAM;
foreach(new i : Player)
{
if(gLogged[i])
{
if(PlayerInfo[i][pTeamId] > 0 && GetPlayerTeam(i) == CLAN+PlayerInfo[i][pTeamId])
{
if(PlayerInfo[i][pTeamId] == PlayerInfo[playerid][pTeamId]) COUNTMYTEAM++;
foreach(new e : Player)
{
if(gLogged[e])
{
if(PlayerInfo[e][pTeamId] == PlayerInfo[i][pTeamId] && PlayerInfo[e][pTeamId] != PlayerInfo[playerid][pTeamId]) CountOtherTeam[e]++;
if(MAXINTEAM< CountOtherTeam[e]) MAXINTEAM= CountOtherTeam[e];
}
}
}
}
}
if(COUNTMYTEAM > 1)
{
// code...
}
return 1;