SA-MP Forums Archive
[Ajuda] undefined symbol "Player" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] undefined symbol "Player" (/showthread.php?tid=650140)



undefined symbol "Player" - BrGabrielBr - 21.02.2018

Botei code no meu gm tudo certinho compilei й deu esses erros lembrando o gm й totalmente do 0 nгo sei como resolve sa parada

PHP код:
C:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : error 017undefined symbol "Player"
C:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : warning 215expression has no effect
C
:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : error 001expected token";"but found "]"
C:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : error 029invalid expressionassumed zero
C
:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : fatal error 107too many error messages on one line 
Linha do erro

PHP код:
if(Player[playerid][Admin] < && Player[playerid][Reporter] <= && Player[playerid][Helper] <= 2
Agora o code

PHP код:
CMD:cone(playeridparams[])
{
    if(
Player[playerid][Admin] < || Player[playerid][Reporter] <= || Player[playerid][Helper] <= 2)
    return 
SCM(playeridCOLOR_ORANGEMSG_CMD_WITHOUT_PERMISSION);
    if(
sscanf(params"s[10]"params))
    return 
SCM(playeridCOLOR_GREY""TAG_USOCORRETO" /cone [criar/remover]");
    if(!
strcmp(params"criar"))
    {
        if(
Cone[playerid])
        return 
SCM(playeridCOLOR_ORANGE""TAG_ERRO" Vocк jб tem um cone criado!");
        new 
Float:posx,
        
Float:posy,
        
Float:posz,
        
Float:angle;
        
GetPlayerFacingAngle(playeridangle);
        
GetPlayerPos(playeridposxposyposz);
        
SetPlayerPos(playeridposxposy+1posz+5);
        
Cone[playerid] = CreateObject(1237posxposyposz-1.000angleGetPlayerVirtualWorld(playerid));
    }
    else if(!
strcmp(params"remover"))
    {
        if(!
Cone[playerid])
        return 
SCM(playeridCOLOR_ORANGE""TAG_ERRO" Vocк nгo tem nenhum Cone criado.");
        
DestroyObject(Cone[playerid]);
        
Cone[playerid] = 0;
    }
    else
    return 
SCM(playeridCOLOR_GREY""TAG_USOCORRETO" /cone [criar/remover]");
    return 
1;




Re: undefined symbol "Player" - F1N4L - 21.02.2018

Precisa criar a array Player e um enumerador.

Код:
enum E_PLAYER
{
    Reporter,
    Admin,
    Helper
}
new Player[MAX_PLAYERS][E_PLAYER];



Re: undefined symbol "Player" - BrGabrielBr - 21.02.2018

Valeu mano jб tinha a enum ai so criei a player dps botei o nome da enum й pronto funciono rep+1