SA-MP Forums Archive
[Ajuda] Erro na gm - 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] Erro na gm (/showthread.php?tid=664662)



Erro na gm - alexsandrofelix - 07.03.2019

minha gm ta dando esse erros nao to conseguindo resolver pode ser facil mais nao to conseguindo me ajuda pf

Code:
Core.pwn(436) : error 001: expected token: ",", but found "sizeof"
Core.pwn(436) : warning 215: expression has no effect
Core.pwn(436) : warning 215: expression has no effect
Core.pwn(436) : error 012: invalid function call, not a valid address
Core.pwn(436) : warning 215: expression has no effect
Core.pwn(436) : error 001: expected token: ";", but found ")"
Core.pwn(436) : fatal error 107: too many error messages on one line
essa e linha do erro
Code:
format(string, sizeof(string), "~r~Nick: ~w~%s", pNome(playerid));
codigo completo

Code:
public OnPlayerUpdate(playerid)
{
new string[46], pNome[24];
    GetPlayerName(playerid, pNome, 24);

    format(string sizeof(string), "~r~Nick: ~w~%s", pNome(playerid));
    PlayerTextDrawSetString(playerid, Textdraw1[playerid][0], string);
    PlayerTextDrawShow(playerid, Textdraw1[playerid][0]);
}



Re: Erro na gm - NWDMadara - 07.03.2019

'-'

Tu manda a linha do erro corrigida depois manda a que estб errada?

Errado: format(string sizeof(string), "");
Correto: format(string, sizeof(string), "");


Re: Erro na gm - ChavesS - 08.03.2019

Tenta ai:

public OnPlayerUpdate(playerid)
{
new string[46], pNome[24];
GetPlayerName(playerid, pNome, 24);

format(string, sizeof(string), "~r~Nick: ~w~%s", pNome(playerid));
PlayerTextDrawSetString(playerid, Textdraw1[playerid][0], string);
PlayerTextDrawShow(playerid, Textdraw1[playerid][0]);
}


Re: Erro na gm - Don_Speed - 08.03.2019

PHP Code:
format(string sizeof(string), "~r~Nick: ~w~%s"pNome); 



Re: Erro na gm - zHellSync - 08.03.2019

Quote:
Originally Posted by Don_Speed
View Post
PHP Code:
format(string sizeof(string), "~r~Nick: ~w~%s"pNome); 
PHP Code:
format(stringsizeof(string), "~r~Nick: ~w~%s"pNome); 
...


Re: Erro na gm - alexsandrofelix - 09.03.2019

Galera tente de tudo mais acho que vou te que refazer o codigo porque nada ta dando certo


Re: Erro na gm - Don_Speed - 09.03.2019

Quote:
Originally Posted by Don_Speed
View Post
PHP Code:
format(string sizeof(string), "~r~Nick: ~w~%s"pNome); 
Falta uma virgula cidadгo .
PHP Code:
format(stringsizeof(string), "~r~Nick: ~w~%s"pNome);