15.03.2012, 18:03
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:
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.
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: