expected token: "-identifier-", but found "-integer value-"
#1

Quote:

C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\gamemodes\DDPTDM.pwn(568 : error 010: invalid function or declaration
C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\gamemodes\DDPTDM.pwn(5689) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\gamemodes\DDPTDM.pwn(5691) : error 021: symbol already defined: "CityHallCaptured"
C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\gamemodes\DDPTDM.pwn(5692) : error 010: invalid function or declaration

Getting these errors ^ on this code.
Edit: I should add some more code so maybe you guys get a better idea so here! Lol.

pawn Код:
stock ActiveCityHall(playerid)
{
    if(Spectating[playerid] == 0 || SInfo[playerid][pOnDuty] == 0)
    {
        if(UnderAttack[CityHall] == 0)
        {
            if(!IsPlayerInAnyVehicle(playerid))
            {
                UnderAttack[CityHall] = 1;
                timer[playerid][CityHall] = SetTimerEx("CityHall", 30000, false,"i",playerid);
                //timer[playerid][CityHall] = SetTimerEx("CityHallTimer", 25000, false,"i",playerid);
                AnnounceTimer[playerid] = SetTimerEx("tensecs", 20000, false,"i",playerid);
                Captured[playerid][CityHall] = 0;
                SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 30 seconds to capture! - |");
                PlayAudioStreamForPlayer(playerid, "http://nikon.bungie.org/misc/h2dialogue/multiplayer/thirty_seconds_remaining.mp3");
                if(gTeam[playerid] == TEAM_CHINA)
                {
                  GangZoneFlashForAll(Zone[CityHall], TEAM_ZONE_COLOR_CHINA);
                }
                else if(gTeam[playerid] == TEAM_RUSSIA)
                {
                  GangZoneFlashForAll(Zone[CityHall], TEAM_ZONE_COLOR_RUSSIA);
                }
                else if(gTeam[playerid] == TEAM_USA)
                {
                  GangZoneFlashForAll(Zone[CityHall], TEAM_ZONE_COLOR_USA);
                }
                //------Message-----
                if(tCP[CityHall] == TEAM_CHINA)
                {
                  SendClientMessage(playerid, COLOR_WHITE,"This flag is controlled by team CHINA");
                  SendTeamMessage(TEAM_CHINA, COLOR_GREEN,"*City Hall is under attack!");
                }
                else if(tCP[CityHall] == TEAM_RUSSIA)
                {
                  SendClientMessage(playerid, COLOR_WHITE,"This flag is controlled by team RUSSIA");
                  SendTeamMessage(TEAM_RUSSIA, COLOR_GREEN,"*City Hall is under attack!");
                }
                else if(tCP[CityHall] == TEAM_USA)
                {
                  SendClientMessage(playerid, COLOR_WHITE,"This flag is controlled by team USA");
                  SendTeamMessage(TEAM_USA, COLOR_GREEN,"*City Hall is under attack!");
                }
                else if(tCP[CityHall] == TEAM_NONE)
                {
                  SendClientMessage(playerid, COLOR_WHITE,"This flag is not controlled by any team");
                }
                //---------loop-------//
                for(new i = 0; i < MAX_PLAYERS; i ++)
                {
                   IsPlayerCapturing[i][CityHall] = 1;
                }
            }
            else return CaptureZoneMessage(playerid, 1);
        }
        else return CaptureZoneMessage(playerid, 2);
    }
    else return CaptureZoneMessage(playerid, 3);
    return 1;
}
stock CityHallCaptured(playerid)
{
    Captured[playerid][CityHall] = 1;
    UnderAttack[CityHall] = 0;
    KillTimer(timer[playerid][CityHall]);
    TextDrawHideForPlayer(playerid, CountText[playerid]);
    CountVar[playerid][CityHall] = 30;
    GivePlayerScore(playerid, 5);
    GivePlayerMoney(playerid, 5000);
    SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"CityHall\" you received +5 scores and +$5000 cash!");
    PlayAudioStreamForPlayer(playerid, "http://nikon.bungie.org/misc/h2dialogue/multiplayer/TerritoryControlled.mp3");
    //==========================================================================
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       IsPlayerCapturing[i][CityHall] = 0;
       if(gTeam[i] == gTeam[playerid] && i != playerid && SInfo[i][pOnDuty] == 0)
       {
           SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured CityHall! You received +2 score for it!");
           GivePlayerScore(i, 2);
       }
    }
    //==========================================================================
    tCP[CityHall] = gTeam[playerid];
    GangZoneStopFlashForAll(Zone[CityHall]);
    //==========================================================================
    if(gTeam[playerid] == TEAM_CHINA)
    {
       GangZoneShowForAll(Zone[CityHall], TEAM_ZONE_COLOR_CHINA);
    }
    else if(gTeam[playerid] == TEAM_RUSSIA)
    {
       GangZoneShowForAll(Zone[CityHall], TEAM_ZONE_COLOR_RUSSIA);
    }
    else if(gTeam[playerid] == TEAM_USA)
    {
       GangZoneShowForAll(Zone[CityHall], TEAM_ZONE_COLOR_USA);
    }
    //==========================================================================
    new str[128];
    format(str, sizeof(str),"%s has captured CityHall Factory",GetTeamName(playerid));
    SendClientMessageToAll(COLOR_ORANGE, str);
    return 1;
}
stock LeavingCityHall(playerid)
{
    Captured[playerid][CityHall] = 1;
    UnderAttack[CityHall] = 0;
    KillTimer(timer[playerid][CityHall]);
    TextDrawHideForPlayer(playerid, CountText[playerid]);
    CountVar[playerid][CityHall] = 30;
    GangZoneStopFlashForAll(Zone[CityHall]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
       IsPlayerCapturing[i][CityHall] = 0;
    }
    SendClientMessage(playerid, COLOR_RED,"*You have been failed to capture this zone!");
    PlayAudioStreamForPlayer(playerid, "http://nikon.bungie.org/misc/h2dialogue/multiplayer/TerritoryLost.mp3");
    KillTimer(AnnounceTimer[playerid]);
    return 1;
}

forward CityHall(playerid);//5688
public CityHall(playerid)//5689
{//5690
    CityHallCaptured(playerid);//5691
    return 1;//5692
}//5693
Any help is appreciated!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)