Issue on public playerid
#1

C:\Documents and Settings\Owner\Desktop\03cCore\gamemodes\SRv95.pwn (1466) : error 017: undefined symbol "playerid"

Where the error is
Код:
SetPlayerMarkerForPlayer(ra, playerid, 0x2641FEAA);
Full code below
Код:
public BackupCheck()
{
    if(BackupCaller < 999)
    {
        if(IsPlayerConnected(BackupCaller))
        {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(BackupCaller, X, Y, Z);
            for(new ra=0; ra<MAX_PLAYERS; ra++)
            {
                if(IsPlayerConnected(ra) && IsALawEnforcer(ra))
                {
                    SetPlayerMarkerForPlayer(ra, playerid, 0x2641FEAA);
                    //SetPlayerCheckpoint(ra,X,Y,Z,3);
                }
            }
            return 1;
        }
        else
        {
            BackupCaller = 999;
            for(new ra=0; ra<MAX_PLAYERS; ra++)
            {
                if(IsPlayerConnected(ra) && IsALawEnforcer(ra))
                {
                    SendClientMessage(ra, COLOR_GRAD1, "Officer needing backup is no longer in range..");
                   	SetPlayerToTeamColor(ra);
                    //DisablePlayerCheckpoint(ra);
                }
            }
            return 0;
        }
    }
    return 0;
}
Reply
#2

The error mean you don't have "playerid" variable inside your function. And as I see you don't pass any data to your function.
pawn Код:
public BackupCheck()//change this
public BackupCheck(playerid)//to this
You also need to change your code where you call this function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)