Help[rep]
#9

Would be nice if it was just one bracket, the code is completely messed. See the beginning of it with cleaned indentation and you should see the problem:

pawn Код:
switch(dialogid)
{
    case 9035:
    {
        switch(listitem)
        {
            case 0:
            {
                for(new i = 0; i<MAX_PLAYERS; i++)
                {
                    SendClientMessage(playerid, 0x83FF46FF, ".: [Bravo]: Ai luat jobul Detective :.");
                    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
                    PlayerInfo[playerid][pJob] = 1;
                    PlayerInfo[playerid][pContractTime] = 5;
                }
            }
            return 1;
        }
        case 1:
        {
            for(new i = 0; i<MAX_PLAYERS; i++)
            {
                SendClientMessage(playerid(i, 0x83FF46FF, ".: [Bravo]: Ai luat jobul Lawyer :.");
                PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
                PlayerInfo[playerid][pJob] = 2;
                PlayerInfo[playerid][pContractTime] = 5;
            }
        }
        return 1;
    }
   
    case 2:
The returns are misplaced, and theres an extra bracket after every single case that messes the whole switch statement. Move all return 1; inside the case block, and remove the unneccesary } after every case.
Reply


Messages In This Thread
Help[rep] - by Dan_Barocu - 15.03.2012, 16:26
Re: Help[rep] - by Dan_Barocu - 15.03.2012, 16:36
Re: Help[rep] - by Dan_Barocu - 15.03.2012, 17:07
Re: Help[rep] - by Vince - 15.03.2012, 17:09
Re: Help[rep] - by GNGification - 15.03.2012, 17:17
Re: Help[rep] - by Dan_Barocu - 15.03.2012, 17:21
Re: Help[rep] - by GNGification - 15.03.2012, 17:23
Re: Help[rep] - by Dan_Barocu - 15.03.2012, 17:46
Re: Help[rep] - by Mauzen - 15.03.2012, 18:03
Re: Help[rep] - by Dan_Barocu - 15.03.2012, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)