07.06.2014, 16:44
Getting Errors with this code..
Errors:
pawn Код:
COMMAND:stats(playerid,params[])
{
new pDeaths, player1, player, h, m, s;
if(sscanf(params, "r", player))
{
player1 = playerid;
}
else
{
player1 = player;
}
if(IsPlayerConnected(player1))
{
TotalGameTime(player1, h, m, s);
if(PlayerInfo[player1][Deaths] == 0) { pDeaths = 1; }
else { pDeaths = PlayerInfo[player1][Deaths]; }
new longstring[1024];
strcat(longstring,"\n{FF0000}Stats of the player:{00CC00} %s\n\n{FF0000}Kills:{00CC00}\t\t%d\n{FF0000}Deaths:{00CC00}\t\t%d\n{FF0000}K/D:{00CC00}\t\t%0.2f\n", GetName(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths);
strcat(longstring,"{FF0000}Score:{00CC00}\t\t%d\n{FF0000}Money:{00CC00}\t\t$%d\n{FF0000}Hours:{00CC00}\t\t%d\n{FF0000}Minutes:{00CC00}\t\t%d\n",GetPlayerScore(player1),GetPlayerMoney(player1),h,m);
strcat(longstring,"{FF0000}Seconds:{00CC00}\t%d\n{FF0000}Register date:{00CC00}\t%s",s,PlayerInfo[player1][RegDate]);
ShowPlayerDialog(playerid, STATS_DIALOG, DIALOG_STYLE_MSGBOX, "Player Stats", longstring, "OK", "");
}
else
{
SendClientMessage(playerid, RED, "Player is not connected!");
}
return 1;
}
Errors:
Код:
C:\DOCUME~1\SAIKUM~1\Desktop\Pure\FS\MELLAD~1.2R3\MELLAD~1.2R3\FILTER~1\MELLAD~1.PWN(3562) : error 035: argument type mismatch (argument 3) C:\DOCUME~1\SAIKUM~1\Desktop\Pure\FS\MELLAD~1.2R3\MELLAD~1.2R3\FILTER~1\MELLAD~1.PWN(3563) : warning 202: number of arguments does not match definition C:\DOCUME~1\SAIKUM~1\Desktop\Pure\FS\MELLAD~1.2R3\MELLAD~1.2R3\FILTER~1\MELLAD~1.PWN(3563) : warning 202: number of arguments does not match definition C:\DOCUME~1\SAIKUM~1\Desktop\Pure\FS\MELLAD~1.2R3\MELLAD~1.2R3\FILTER~1\MELLAD~1.PWN(3563) : warning 202: number of arguments does not match definition C:\DOCUME~1\SAIKUM~1\Desktop\Pure\FS\MELLAD~1.2R3\MELLAD~1.2R3\FILTER~1\MELLAD~1.PWN(3564) : warning 202: number of arguments does not match definition