Need Help with this error
#2

If you indent the code properly, maybe you can see the mistake then?

pawn Код:
command(driveroute, playerid, params[])
{
    for(new h = 0; h < sizeof(Jobs); h++)
    {
        if(Player[playerid][Job] == h && Jobs[Player[playerid][Job]][JobType] == 6)
        if(IsPlayerInVehicle(playerid, bus1) || IsPlayerInVehicle(playerid, bus2) || IsPlayerInVehicle(playerid, bus3) || IsPlayerInVehicle(playerid, bus4) || IsPlayerInVehicle(playerid, bus5))
        {
            TogglePlayerControllable(playerid, 1);
            CP[playerid] = 200;
            SetPlayerCheckpoint(playerid, 1810.2170,-1890.1097,13.4072, 4.0);
            DrivingRoute[playerid] = 1;
            SendClientMessage(playerid, COLOR_RED, "Please follow the checkpoints and drive safety!");
        }
    }
    else
    {
        SCM(playerid, COLOR_RED,"You are not in a bus.");
    }
    return 1;
}
It should be if - else, not for - else
Reply


Messages In This Thread
Need Help with this error - by Stefand - 06.06.2012, 15:33
Re: Need Help with this error - by MadeMan - 06.06.2012, 15:46

Forum Jump:


Users browsing this thread: 3 Guest(s)