Class Errors: loose indentation (2 Errors)
#6

Quote:
Originally Posted by kooltuO
View Post
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0:
        {
           gTeam[playerid] = TEAM_TRUCKER;
           SetPlayerTeam(playerid, TEAM_TRUCKER);
           GameTextForPlayer(playerid, "Trucker", 5000, 5);
           SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700);
           SetPlayerFacingAngle(playerid, 4018);
           SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768);
           SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700);

        }
        case 1:
        {

           gTeam[playerid] = TEAM_COP;
           SetPlayerTeam(playerid, TEAM_COP);
           GameTextForPlayer(playerid, "Police", 5000, 5);
           SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663);
           SetPlayerFacingAngle(playerid,8298);
           SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665);
           SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663);

        }
        else:
        {
               SetPlayerToTeamColour(playerid);
        }
    }
    return 1;
}
should fix it. You made a mistake with the brackets
pawn Code:
Trucking.pwn(72) : error 002: only a single statement (or expression) can follow each "case"
Trucking.pwn(75) : error 054: unmatched closing brace ("}")
Trucking.pwn(76) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)