2 errors
#1

When I add this
pawn Код:
{ // ERROR LINE 153
    SetPlayerTeamFromClass(playerid, classid);
    return 1; // ERROR LINE 155
}
Under
pawn Код:
public OnPlayerRequestClass(playerid, classid)
I get errors like
pawn Код:
C:\Documents and Settings\-----\PA51.pwn(153) : error 055: start of function body without function header
C:\Documents and Settings\dell\-----\PA51.pwn(155) : error 010: invalid function or declaration
Reply
#2

Bump
Reply
#3

pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
    switch(classid)
    {
        case 0: gTeam[playerid] = Class1;
        case 1: gTeam[playerid] = Class2;
    }
}
Do not put this inside any callback ( { } 's)
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
    case 0: // Change everything to your needs
    {
        SetPlayerTeamFromClass(playerid, classid);
        SetPlayerInterior(playerid,17);
        SetPlayerPos(playerid,486.0409, -9.4562, 1000.6719);
        SetPlayerFacingAngle(playerid, 137.9666);
        SetPlayerCameraPos(playerid, 483.809051, -13.435981, 1000.679687);
        SetPlayerCameraLookAt(playerid, 486.0409, -9.4562, 1000.6719);
        GameTextForPlayer(playerid, "Class 1", 1000, 3);
    }
    case 1:
    {
        SetPlayerTeamFromClass(playerid, classid);
        SetPlayerInterior(playerid,17);
        SetPlayerPos(playerid,486.0409, -9.4562, 1000.6719);
        SetPlayerFacingAngle(playerid, 137.9666);
        SetPlayerCameraPos(playerid, 483.809051, -13.435981, 1000.679687);
        SetPlayerCameraLookAt(playerid, 486.0409, -9.4562, 1000.6719);
        GameTextForPlayer(playerid, "Class 2", 1000, 3);
    }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)