Jump to content

Question

Posted

Am liniile:

forward ZoneTimer(playerid);
public ZoneTimer(playerid)
{
    for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
    {
        if(ZoneAttacker[i] != -1) // zone is being attacked
        {
            if(GetPlayersInZone(i, ZoneAttacker[i]) >= MIN_MEMBERS_TO_START_WAR) // team has enough members in the zone
            {
                ZoneAttackTime[i]++;
                if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
                {
                    GangZoneStopFlashForAll(ZoneID[i]);
                    ZoneInfo[i][zTeam] = ZoneAttacker[i];
                    GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
                    ZoneAttacker[i] = -1;
                }
            }
            else // attackers failed to take over the zone
            {
                GangZoneStopFlashForAll(ZoneID[i]);
                ZoneAttacker[i] = -1;
            }
        }
        else // check if somebody is attacking
        {
            for(new t=0; t < sizeof(Teams); t++) // loop all teams
            {
                if(Teams[t] != ZoneInfo[i][zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR) // if there are enough enemies in the zone
                {
                    ZoneAttacker[i] = Teams[t];
                    ZoneAttackTime[i] = 0;
                    GangZoneFlashForAll(ZoneID[i], GetTeamZoneColor(ZoneAttacker[i]));
                }
            }
        }
    }
    return true;
}
Am erorile:
C:\Users\Alex\Desktop\samp03x_svr_R1-2_win32-2\gamemodes\MilitariGm.pwn(3249) : error 017: undefined symbol "Teams"
C:\Users\Alex\Desktop\samp03x_svr_R1-2_win32-2\gamemodes\MilitariGm.pwn(3249) : error 036: empty statement
C:\Users\Alex\Desktop\samp03x_svr_R1-2_win32-2\gamemodes\MilitariGm.pwn(3249) : error 017: undefined symbol "t"
C:\Users\Alex\Desktop\samp03x_svr_R1-2_win32-2\gamemodes\MilitariGm.pwn(3249) : 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.
for(new t=0; t < sizeof(Teams); t++) // loop all teams[/code]

1 answer to this question

Recommended Posts

Posted

nu ai definit team, trebuie sa faci un enum, sau schimba sizeof(Teams) cu o cifra.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.