02.01.2015, 12:04
@HY:
< This is your code.
Errors:
pawn Код:
CMD:stats(playerid,params[])
if(sscanf(params, "u", id) return SendClientMessage(playerid, -1, "/Stats [ID]");
{
new string[128];
format(string, sizeof(string), "Account: %s\nMoney: $%d\nKills: %d\nDeaths: %d",GetPlayerName(playerid),GetPlayerMoney(playerid),pInfo[playerid][Kills],pInfo[playerid][Deaths]);
ShowPlayerDialog(playerid, dstats, DIALOG_STYLE_MSGBOX, "Account Stats", string, "Close", "");
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF000080,"Player has not logged in the server!");
Errors:
pawn Код:
SA-MP\pawno\include\YSI\y_utils.inc(337) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\YSI\y_utils.inc(491) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\YSI\y_utils.inc(534) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\YSI\y_utils.inc(552) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\YSI\y_malloc.inc(216) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
SA-MP\pawno\SAMP.pwn(170) : error 001: expected token: ")", but found "return"
SAMP.pwn(171) : warning 209: function "cmd_stats" should return a value
SAMP.pwn(171) : error 055: start of function body without function header
SAMP.pwn(173) : error 021: symbol already defined: "format"
SAMP.pwn(176) : error 010: invalid function or declaration
SAMP.pwn(177) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase