Bracket Error
#2

An advise is to indent your code and see if there're more or less brackets. Look at the end.
pawn Код:
case DIALOG_BUY_CLASSES:
{
    if(response)
    {
        if(team[playerid] == TEAM_HUMAN)
        {
            if(pInfo[playerid][SkinChanges] >= 1)
            {
                switch(listitem)
                {
                    case 0: if(pInfo[playerid][pCookies] >= 10) pInfo[playerid][pCookies] -= 10,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ENGINEER,setClass(playerid); else { SendCookieError(playerid,10); }
                    case 1: if(pInfo[playerid][pCookies] >= 10) pInfo[playerid][pCookies] -= 10,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = SWAT,setClass(playerid); else { SendCookieError(playerid,10); }
                    case 2: if(pInfo[playerid][pCookies] >= 50) pInfo[playerid][pCookies] -= 50,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = HEAVYSHOTGUN,setClass(playerid); else { SendCookieError(playerid,50); }
                    case 3: if(pInfo[playerid][pCookies] >= 10) pInfo[playerid][pCookies] -= 10,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDMEDIC,setClass(playerid); else { SendCookieError(playerid,10); }
                    case 4: if(pInfo[playerid][pCookies] >= 15) pInfo[playerid][pCookies] -= 15,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDENGINEER,setClass(playerid); else { SendCookieError(playerid,15); }
                    case 5: if(pInfo[playerid][pCookies] >= 15) pInfo[playerid][pCookies] -= 15,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = FEDERALAGENT,setClass(playerid); else { SendCookieError(playerid,15); }
                    case 6: if(pInfo[playerid][pCookies] >= 100) pInfo[playerid][pCookies] -= 100,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = KICKBACK,setClass(playerid); else { SendCookieError(playerid,100); }
                    case 7: if(pInfo[playerid][pCookies] >= 80) pInfo[playerid][pCookies] -= 15,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDSCOUT,setClass(playerid); else { SendCookieError(playerid,80); }
                    case 8: if(pInfo[playerid][pCookies] >= 20) pInfo[playerid][pCookies] -= 20,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = E_ENGINEER,setClass(playerid); else { SendCookieError(playerid,20); }
                    case 9: if(pInfo[playerid][pCookies] >= 100) pInfo[playerid][pCookies] -= 100,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = DOCTOR,setClass(playerid); else { SendCookieError(playerid,100); }
                }
            }
            else return SendClientMessage(playerid,-1,""chat""COL_RED" You are not allowed to change your class anymore!");
        }
        else return SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You must be a human to buy weapons");
    }
}
}
}
}
Reply


Messages In This Thread
Bracket Error - by Blackazur - 06.07.2013, 17:40
Re: Bracket Error - by Konstantinos - 06.07.2013, 17:43
AW: Bracket Error - by Blackazur - 06.07.2013, 17:46
Re: Bracket Error - by Konstantinos - 06.07.2013, 17:53
AW: Bracket Error - by Blackazur - 06.07.2013, 17:57
AW: Bracket Error - by Blackazur - 06.07.2013, 18:03
AW: Bracket Error - by Blackazur - 06.07.2013, 18:07
AW: Bracket Error - by Blackazur - 06.07.2013, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)