Teams, 4 errors 1 warning
#1

Hi, I am trying to make teams, I looked up another script and copyed to mine, now this happens:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    gPlayerClass[playerid] = classid; //  THIS IS ERROR LINE 69; THIS IS ERROR LINE 69; THIS IS ERROR LINE 69;

    switch (classid) {

        case 0:

            {
                gTeam[playerid] = TEAM_ARMY;
                GameTextForPlayer(playerid, "~p~Army", 1000, 6);
                ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);

            }

        case 1:

            {
                gTeam[playerid] = TEAM_TERRORISTS;
                GameTextForPlayer(playerid, "~b~Terrorists", 1000, 6);
                ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);
            }
    }
    SetPlayerPos(playerid, 2524.2695,-1696.2926,18.2204);
    SetPlayerFacingAngle( playerid, 2.3616 );
    SetPlayerCameraPos(playerid, 2523.7749,-1692.6855,18.9011);
    SetPlayerCameraLookAt(playerid, 2524.2695,-1696.2926,18.2204);
    return 1;
}
And errors:


pawn Код:
C:\Documents and Settings\---------------------\PA51.pwn(69) : error 017: undefined symbol "gPlayerClass"
C:\Documents and Settings\---------------------PA51.pwn(69) : warning 215: expression has no effect
C:\Documents and Settings\---------------------\PA51.pwn(69) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\---------------------\PA51.pwn(69) : error 029: invalid expression, assumed zero
C:\Documents and Settings\---------------------\PA51.pwn(69) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Oh now when I removed " [ ] " and replaced with " ( ) " I got only 1 error and warning,

pawn Код:
C:\Documents and Settings\-------------------\PA51.pwn(69) : error 017: undefined symbol "gPlayerClass"
C:\Documents and Settings\\-------------------\PA51.pwn(69) : warning 215: expression has no effect
Reply
#3

FIXED!! FIGURED IT OUT MYSELF!?!?!?
Reply
#4

you just had to define gPlayerClass I believe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)