[Ajuda] Format
#4

Quote:
Originally Posted by BlueX
Посмотреть сообщение
Nada a ver, o erro estб aqui
pawn Код:
GetPlayerName(playerid)
Ele estб a usar GetPlayerName da forma errada, isto porque o GetPlayerName nгo retorna o nome do jogador, ele apenas passa o nome do jogador para uma variбvel. Por isso seria necessбrio fazer
pawn Код:
new p_name[24];
GetPlayerName(playerid,p_name)
Depois era sу colocar

pawn Код:
format(dstring, sizeof(dstring), "Nome: %s || Score: %d || Grana: %d", p_name, GetPlayerScore(playerid), GetPlayerMoney(playerid));
Amigo, entгo ficaria assim?

pawn Код:
public OnPlayerClickPlayer(playerid, clickedid, source)
{
   new p_name[24];
   GetPlayerName(playerid, p_name);

   new dstring[256];
   format(dstring, sizeof(dstring), "Nome: %s || Score: %d || Grana: %d", p_name, GetPlayerScore(playerid), GetPlayerMoney(playerid));
   ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "STATUS", dstring, "Fechar", "");
   return 1;
}
Por que ao compilar recebo estes erros:

Код:
C:\Users\usuario\Desktop\Servidor\gamemodes\gangwar.pwn(581) : error 025: function heading differs from prototype
C:\Users\usuario\Desktop\Servidor\gamemodes\gangwar.pwn(584) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Linhas:

pawn Код:
public OnPlayerClickPlayer(playerid, clickedid, source)
e

pawn Код:
GetPlayerName(playerid, p_name);
Reply


Messages In This Thread
Format - by Insidious - 30.07.2014, 17:33
Re: Format - by SW1FTmeister - 30.07.2014, 18:04
Re: Format - by RebeloX - 30.07.2014, 18:28
Re: Format - by Insidious - 30.07.2014, 18:40
Re: Format - by SW1FTmeister - 30.07.2014, 18:44
Re: Format - by MatheusAlcapone - 30.07.2014, 18:46
Re: Format - by Insidious - 30.07.2014, 19:07
Re: Format - by Schocc - 30.07.2014, 19:52
Re: Format - by Insidious - 30.07.2014, 20:02

Forum Jump:


Users browsing this thread: 1 Guest(s)