Errors help.
#10

u used case 11 twice try this

pawn Код:
CMD:d(playerid, params[])
{
    new string[128];
    if(isnull(params)) return SendClientMessageEx(playerid, COLOR_RED, "USAGE: (/d)epartments [department chat]");

    new employer[16], rank[64], division[16];
    switch (PlayerInfo[playerid][pMember]) // employer/rank/division data is pulled from here
    {
        case 1:
        {
            employer = "[SAPD]";
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Police Officer";
                case 2: rank = "Corporal";
                case 3: rank = "Sergeant";
                case 4: rank = "Liuetenant";
                case 5: rank = "Captain";
                case 6: rank = "Chief of Police";
                default: rank = "Probationary Officer";
            }
        }

        case 2:
        {
            employer = "[FBI]";
            switch(PlayerInfo[playerid][pRank])
            {
            case 1: rank = "Probationary Agent";
            case 2: rank = "Federal Agent";
            case 3: rank = "Senior Federal Agent";
            case 4: rank = "Special Federal Agent";
            case 5: rank = "Assistant Federal Director";
            case 6: rank = "Federal Director";
            default: rank = "Probationary Agent";
            }
        }
        case 3:
        {
            employer = "[SASP]";
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Officer";
                case 2: rank = "Corporal";
                case 3: rank = "Sergeant";
                case 4: rank = "Lieutenant";
                case 5: rank = "Captain";
                case 6: rank = "Chief";
                default: rank = "Cadet";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = "(HR) ";
                case 2: division = "(ERT) ";
                case 3: division = "(IA) ";
                case 4: division = "(SO) ";
                default: division = "";
            }
        }
        case 4:
        {
            employer = "[FDSA]";
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "EMT Intermediate";
                case 2: rank = "EMT Paramedic";
                case 3: rank = "Lieutenant";
                case 4: rank = "Captain";
                case 5: rank = "Deputy Chief";
                case 6: rank = "Chief";
                default: rank = "EMT Basic";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = "(FD) ";
                case 2: division = "(LF) ";
                case 3: division = "(T&R) ";
                default: division = "";
            }
        }
        case 5:
        {
            employer = "[Supreme Court]";
            switch(PlayerInfo[playerid][pRank])
            {
            case 1: rank = "Clerk of Court";
            case 2: rank = "District Attorney";
            case 3: rank = "District Judge";
            case 4: rank = "Appellate Judge";
            case 5: rank = "Associate Justice of the Supreme Court";
            case 6: rank = "Chief Justice of the Supreme Court";
            default: rank = "Clerk of Court";
            }
        }
        case 6:
        {
            employer = "[Government]";
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Staff Member";
                case 2: rank = "G.E.T. Officer";
                case 3: rank = "Legislator";
                case 4: rank = "Government Cabinet";
                case 5: rank = "Lieutenant Governor";
                case 6: rank = "Governor";
                default: rank = "Intern";
            }
        }
        case 7:
        {
            employer = "[SAST]";
            switch(PlayerInfo[playerid][pRank])
            {
            case 1: rank = "State Trooper";
            case 2: rank = "State Corporal";
            case 3: rank = "State Sergeant";
            case 4: rank = "State Liuetenant";
            case 5: rank = "State Colonel";
            case 6: rank = "State General";
            default: rank = "State Cadet";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
            case 2: division = "(TET) ";
            case 3: division = "(SCU) ";
            case 4: division = "(SORT) ";
            case 5: division = "(FTO) ";
            default: division = "";
            }
        }
        case 11:
        {
            employer = "National Guard";
            switch(PlayerInfo[playerid][pRank])
            {
                case 0: rank= "Private";
                case 1: rank = "Corporal";
                case 2: rank = "Sergeant";
                case 3: rank = "Lieutenant";
                case 4: rank = "Captain";
                case 5: rank = "Major";
                case 6: rank = "General";
                default: rank = "Private";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = "(AIR) ";
                case 2: division = "(ARM) ";
                case 3: division = "(VET) ";
                case 4: division = "(AIR SF) ";
                case 5: division = "(ARM SF) ";
                case 6: division = "(INF) ";
                default: division = "";
            }
        }
        case 12:
        {
            employer = "Trojan International";
            switch(PlayerInfo[playerid][pRank])
            {
                case 0: rank= "Probationary Operative";
                case 1: rank = "Operative";
                case 2: rank = "Operative II";
                case 3: rank = "Trusted Operative";
                case 4: rank = "Trusted Operative II";
                case 5: rank = "Co-Chief Operative";
                case 6: rank = "Chief Operative";
                default: rank = "Probationary Agent";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = "(AIR) ";
                case 2: division = "(ARM) ";
                case 3: division = "(VET) ";
                case 4: division = "(AIR SF) ";
                case 5: division = "(ARM SF) ";
                case 6: division = "(INF) ";
                default: division = "";
            }
        }
        case 13:
        {
            employer = "[NOOSE]";
            switch(PlayerInfo[playerid][pRank])
            {
                case 0: rank = "Ensign";
                case 1: rank = "Marksman";
                case 2: rank = "Elite Marksman";
                case 3: rank = "Operative";
                case 4: rank = "Elite Operative";
                case 5: rank = "Vice Commander";
                case 6: rank = "Supreme Commander";
                default: rank = "Ensign";
            }
            division = "";
        }
    }
}
Reply


Messages In This Thread
Errors help. - by PrinceOfPersia - 20.05.2014, 13:45
Re: Errors help. - by Campbell- - 20.05.2014, 13:50
Re: Errors help. - by PrinceOfPersia - 20.05.2014, 13:51
Re: Errors help. - by PrinceOfPersia - 20.05.2014, 14:02
Re: Errors help. - by superrobot48 - 20.05.2014, 14:26
Re: Errors help. - by PrinceOfPersia - 20.05.2014, 14:28
Re: Errors help. - by JFF - 20.05.2014, 14:57
Re: Errors help. - by superrobot48 - 20.05.2014, 14:59
Re: Errors help. - by PrinceOfPersia - 20.05.2014, 15:00
Re: Errors help. - by JFF - 20.05.2014, 15:12

Forum Jump:


Users browsing this thread: 2 Guest(s)