[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 017: undefined symbol "Player"
C:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : warning 215: expression has no effect
C:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : error 001: expected token: ";", but found "]"
C:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : error 029: invalid expression, assumed zero
C:\Users\Lan\Desktop\Vida De Bandido\gamemodes\Prуpria.pwn(294) : fatal error 107: too many error messages on one line
Linha do erro
PHP код:
if(Player[playerid][Admin] < 1 && Player[playerid][Reporter] <= 1 && Player[playerid][Helper] <= 2)
Agora o code
PHP код:
CMD:cone(playerid, params[])
{
if(Player[playerid][Admin] < 1 || Player[playerid][Reporter] <= 1 || Player[playerid][Helper] <= 2)
return SCM(playerid, COLOR_ORANGE, MSG_CMD_WITHOUT_PERMISSION);
if(sscanf(params, "s[10]", params))
return SCM(playerid, COLOR_GREY, ""TAG_USOCORRETO" /cone [criar/remover]");
if(!strcmp(params, "criar"))
{
if(Cone[playerid])
return SCM(playerid, COLOR_ORANGE, ""TAG_ERRO" Vocк jб tem um cone criado!");
new Float:posx,
Float:posy,
Float:posz,
Float:angle;
GetPlayerFacingAngle(playerid, angle);
GetPlayerPos(playerid, posx, posy, posz);
SetPlayerPos(playerid, posx, posy+1, posz+5);
Cone[playerid] = CreateObject(1237, posx, posy, posz-1.0, 0, 0, angle, GetPlayerVirtualWorld(playerid));
}
else if(!strcmp(params, "remover"))
{
if(!Cone[playerid])
return SCM(playerid, COLOR_ORANGE, ""TAG_ERRO" Vocк nгo tem nenhum Cone criado.");
DestroyObject(Cone[playerid]);
Cone[playerid] = 0;
}
else
return SCM(playerid, COLOR_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