SA-MP Forums Archive
what this error! ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: what this error! ? (/showthread.php?tid=471457)



what this error! ? - Another1 - 23.10.2013

what this error! ?


pawn Код:
CMD:pinfo(playerid,params[])
{
  new id;
  if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
  if(sscanf(params,"u", id)) return SCM(playerid, RED, "Get some info about a player: /pinfo <playerid>");
  if(!IsPlayerConnected(playerid)) return SCM(playerid, RED, "Player is not connected");
  new b_name[MAX_PLAYER_NAME], p_ip[25], str1[100];
  GetPlayerName(playerid, b_name,sizeof (b_name));
  GetPlayerIp(playerid, p_ip,sizeof (p_ip));
  format(str1,sizeof (str1),"Player name: {27FF0A}%s\nPlayer ip: {27FF0A}%s\nPlayer Money: $%i\nPlayer ping: %s\n Player health: %i",b_name, p_ip, GetPlayerMoney(playerid), GetPlayerPing(playerid), GetPlayerHealth(playerid));
  ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "{27FF0A}Info",str1,"Ok","");
  return 1;
}
pawn Код:
C:\Users\John\Desktop\Server\filterscripts\TuNiAdmin.pwn(272) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.



Re: what this error! ? - xXxFerZExXx - 23.10.2013

Dont Worry about that ,And dont waste your time about that , It will compile Sucessfully , its not a error bro its just a warning...


Re: what this error! ? - ModernStreets - 23.10.2013

Every error / warning should be fixed though, what is the actual error line?


Re: what this error! ? - EiresJason - 23.10.2013

Quote:
Originally Posted by xXxFerZExXx
Посмотреть сообщение
Dont Worry about that ,And dont waste your time about that , It will compile Sucessfully , its not a error bro its just a warning...
So wrong xD

You're using the GetPlayerHealth function wrong.

Try this:
pawn Код:
CMD:pinfo(playerid,params[])
{
  new id;
  if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
  if(sscanf(params,"u", id)) return SCM(playerid, RED, "Get some info about a player: /pinfo <playerid>");
  if(!IsPlayerConnected(playerid)) return SCM(playerid, RED, "Player is not connected");
  new b_name[MAX_PLAYER_NAME], p_ip[25], str1[100], Float:hp;
  GetPlayerHealth(playerid,hp);
  GetPlayerName(playerid, b_name,sizeof (b_name));
  GetPlayerIp(playerid, p_ip,sizeof (p_ip));
  format(str1,sizeof (str1),"Player name: {27FF0A}%s\nPlayer ip: {27FF0A}%s\nPlayer Money: $%i\nPlayer ping: %s\n Player health: %i",b_name, p_ip, GetPlayerMoney(playerid), GetPlayerPing(playerid), hp);
  ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "{27FF0A}Info",str1,"Ok","");
  return 1;
}



Re: what this error! ? - x96664 - 23.10.2013

Quote:
Originally Posted by xXxFerZExXx
Посмотреть сообщение
Dont Worry about that ,And dont waste your time about that , It will compile Sucessfully , its not a error bro its just a warning...
Your answer is wrong on so many levels .. If you leave such an/a error/warning you may harm you server.


Re: what this error! ? - Another1 - 23.10.2013

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
So wrong xD

You're using the GetPlayerHealth function wrong.

Try this:
pawn Код:
CMD:pinfo(playerid,params[])
{
  new id;
  if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
  if(sscanf(params,"u", id)) return SCM(playerid, RED, "Get some info about a player: /pinfo <playerid>");
  if(!IsPlayerConnected(playerid)) return SCM(playerid, RED, "Player is not connected");
  new b_name[MAX_PLAYER_NAME], p_ip[25], str1[100], Float:hp;
  GetPlayerHealth(playerid,hp);
  GetPlayerName(playerid, b_name,sizeof (b_name));
  GetPlayerIp(playerid, p_ip,sizeof (p_ip));
  format(str1,sizeof (str1),"Player name: {27FF0A}%s\nPlayer ip: {27FF0A}%s\nPlayer Money: $%i\nPlayer ping: %s\n Player health: %i",b_name, p_ip, GetPlayerMoney(playerid), GetPlayerPing(playerid), hp);
  ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "{27FF0A}Info",str1,"Ok","");
  return 1;
}
problem sloved thank you