{SOLVED}missing brace errors
#3

Here your missing brackets:

pawn Код:
if(dialogid == CIVILIAN_DIALOG && response == 1)
  {
        TogglePlayerControllable(playerid, 1);
    if(listitem == 0)
    {
            SendClientMessage(playerid,0x1E90FFAA, "RAPIST: You can rape other players and infect them with STDs that could kill them");

            GivePlayerWeapon(playerid,5,1);
      GivePlayerWeapon(playerid,22,100);
      GivePlayerWeapon(playerid,14,1);
      gTeam[playerid] = TEAM_RAPIST;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 1)
    {
        SendClientMessage(playerid,0x1E90FFAA, "Type /commands for your commands");
            SendClientMessage(playerid,0x00FFFFAA, "GUN DEALER: If anyone needs weapons then you sell them some lead. Your prices are set by the game");
        SendClientMessage(playerid,0x00FFFFAA, "You can also deliver guns to ammunations, just get in the PATRIOT car at ammunation stores in LS");
      GivePlayerWeapon(playerid,29,500);
      GivePlayerWeapon(playerid,30,50);
      gTeam[playerid] = TEAM_GUNDEALER;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 2)
    {
          SendClientMessage(playerid,0x00FFFFAA, "DRUG DEALER: You will supply people with drugs for a price. Dont let people rip you off..");
      SendClientMessage(playerid,0x00FFFFAA, "Keep a watch on the chat for players wanting drugs. Visit the drug house to replenish your stock");
          GivePlayerWeapon(playerid,25,50);
      GivePlayerWeapon(playerid,28,100);
        GivePlayerWeapon(playerid,5,1);
      gTeam[playerid] = TEAM_DRGDEL;
      PlayerDrugs[playerid] = 500;
      SetPlayerToTeamColour(playerid);
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 3)
    {
        SendClientMessage(playerid,0x00FFFFAA, "HITMAN: If anyone needs another player dead then they will contact you. Make sure you agree a price and get paid");
      SendClientMessage(playerid,0x00FFFFAA, "Type /hits to see if there are any hit contracts available");
      GivePlayerWeapon(playerid,27,250);
      GivePlayerWeapon(playerid,23,100);
      GivePlayerWeapon(playerid,31,250);
      gTeam[playerid] = TEAM_HITMAN;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 4)
    {
            SendClientMessage(playerid,0x00FFFFAA, "PRIVATE MEDIC: If anyone needs medical attention for cuts and bruses or STDs then you can cure then and heal them");
      SendClientMessage(playerid,0x00FFFFAA, "You can also infect them with STDs that could kill them DO NOT HIT/INFECT THEM JUST TO HEAL/CURE THEM");
      GivePlayerWeapon(playerid,22,250);
      gTeam[playerid] = TEAM_PVTMED;
        CanChooseSkill[playerid] =0;
    }
    if(listitem == 5)
    {
            SendClientMessage(playerid,0x00FFFFAA, "BOUNTY HUNTER: You have to help the cops take Escaped prisoners back into custody");
      SendClientMessage(playerid,0x00FFFFAA, "Simply target RED players and type /ar (id) next to them to see if you have found an escaped convict");
      SendClientMessage(playerid,0x00FFFFAA, "Type /bounty for details of Escaped Prisoners");
      GivePlayerWeapon(playerid,27,250);
      GivePlayerWeapon(playerid,23,100);
      GivePlayerWeapon(playerid,31,250);
      gTeam[playerid] = TEAM_BOUNTY;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 6)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 7)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 8)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 9)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 10)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 11)
    {
            // Nothing more to copy-paste.
    }
Correct would be

pawn Код:
if(dialogid == CIVILIAN_DIALOG && response == 1)
  {
        TogglePlayerControllable(playerid, 1);
    if(listitem == 0)
    {
            SendClientMessage(playerid,0x1E90FFAA, "RAPIST: You can rape other players and infect them with STDs that could kill them");

            GivePlayerWeapon(playerid,5,1);
      GivePlayerWeapon(playerid,22,100);
      GivePlayerWeapon(playerid,14,1);
      gTeam[playerid] = TEAM_RAPIST;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 1)
    {
        SendClientMessage(playerid,0x1E90FFAA, "Type /commands for your commands");
            SendClientMessage(playerid,0x00FFFFAA, "GUN DEALER: If anyone needs weapons then you sell them some lead. Your prices are set by the game");
        SendClientMessage(playerid,0x00FFFFAA, "You can also deliver guns to ammunations, just get in the PATRIOT car at ammunation stores in LS");
      GivePlayerWeapon(playerid,29,500);
      GivePlayerWeapon(playerid,30,50);
      gTeam[playerid] = TEAM_GUNDEALER;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 2)
    {
          SendClientMessage(playerid,0x00FFFFAA, "DRUG DEALER: You will supply people with drugs for a price. Dont let people rip you off..");
      SendClientMessage(playerid,0x00FFFFAA, "Keep a watch on the chat for players wanting drugs. Visit the drug house to replenish your stock");
          GivePlayerWeapon(playerid,25,50);
      GivePlayerWeapon(playerid,28,100);
        GivePlayerWeapon(playerid,5,1);
      gTeam[playerid] = TEAM_DRGDEL;
      PlayerDrugs[playerid] = 500;
      SetPlayerToTeamColour(playerid);
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 3)
    {
        SendClientMessage(playerid,0x00FFFFAA, "HITMAN: If anyone needs another player dead then they will contact you. Make sure you agree a price and get paid");
      SendClientMessage(playerid,0x00FFFFAA, "Type /hits to see if there are any hit contracts available");
      GivePlayerWeapon(playerid,27,250);
      GivePlayerWeapon(playerid,23,100);
      GivePlayerWeapon(playerid,31,250);
      gTeam[playerid] = TEAM_HITMAN;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 4)
    {
            SendClientMessage(playerid,0x00FFFFAA, "PRIVATE MEDIC: If anyone needs medical attention for cuts and bruses or STDs then you can cure then and heal them");
      SendClientMessage(playerid,0x00FFFFAA, "You can also infect them with STDs that could kill them DO NOT HIT/INFECT THEM JUST TO HEAL/CURE THEM");
      GivePlayerWeapon(playerid,22,250);
      gTeam[playerid] = TEAM_PVTMED;
        CanChooseSkill[playerid] =0;
    }
    if(listitem == 5)
    {
            SendClientMessage(playerid,0x00FFFFAA, "BOUNTY HUNTER: You have to help the cops take Escaped prisoners back into custody");
      SendClientMessage(playerid,0x00FFFFAA, "Simply target RED players and type /ar (id) next to them to see if you have found an escaped convict");
      SendClientMessage(playerid,0x00FFFFAA, "Type /bounty for details of Escaped Prisoners");
      GivePlayerWeapon(playerid,27,250);
      GivePlayerWeapon(playerid,23,100);
      GivePlayerWeapon(playerid,31,250);
      gTeam[playerid] = TEAM_BOUNTY;
      CanChooseSkill[playerid] =0;
    }
    if(listitem == 6)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 7)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 8)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 9)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 10)
    {
            // Nothing more to copy-paste.
    }
    if(listitem == 11)
    {
            // Nothing more to copy-paste.
    }
}
Reply


Messages In This Thread
{SOLVED}missing brace errors - by ruckfules99 - 15.03.2010, 00:05
Re: missing brace errors - by MrIncredible - 15.03.2010, 00:07
Re: missing brace errors - by Torran - 15.03.2010, 00:08
Re: missing brace errors - by ruckfules99 - 15.03.2010, 00:10
Re: [help]missing bracket errors - by ruckfules99 - 15.03.2010, 03:20
Re: [help]missing brace errors - by MrIncredible - 15.03.2010, 03:25
Re: [help]missing brace errors - by ruckfules99 - 15.03.2010, 03:33
Re: missing brace errors - by Torran - 15.03.2010, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)