CMD:stats (playerid, params[])
{
new str[300], giveid, AdminRank[20];
if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF, "{F07F1D}USAGE: {BBFF00}/stats <ID>" );
if (giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"Invalid player ID!");
switch (PlayerInfo[giveid][Admin])
{
case 0: AdminRank = "Regular Player";
case 1: AdminRank = "Moderator";
case 2: AdminRank = "Administrator";
case 3: AdminRank = "Head Administrator";
case 4: AdminRank = "Server Owner";
}
format(str, sizeof(str), "{%06x}%s(%d) Statistics:\n\n"STEELBLUE"> Registration Date: "GREY"%s\n"STEELBLUE"> Status: "GREY"Level %d\n"STEELBLUE"> Online Time: "GREY"%d hours and %d minutes"STEELBLUE"> EXP: "GREY"%d\n"STEELBLUE"> Cash: "GREY"$%d\n"STEELBLUE"> Kills: "GREY"%d\n"STEELBLUE"> Deaths: "GREY"%d\n"STEELBLUE"> Weapon Set: "GREY"%s", (GetPlayerColor(giveid) >>> 8), GetName(giveid), giveid, PlayerInfo[giveid][RegOn], AdminRank, PlayerInfo[giveid][Hours], PlayerInfo[giveid][Minutes], GetPlayerScore(giveid), GetPlayerMoney(giveid), PlayerInfo[giveid][Kills], PlayerInfo[giveid][Deaths], WeaponSet);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""RED"Statistics", str, "OK", "");
return 1;
}
CMD:stats (playerid, params[])
{
new str[300], giveid, AdminRank[20];
if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF, "{F07F1D}USAGE: {BBFF00}/stats <ID>" );
if (giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"Invalid player ID!");
switch (PlayerInfo[giveid][Admin])
{
case 0: AdminRank = "Regular Player";
case 1: AdminRank = "Moderator";
case 2: AdminRank = "Administrator";
case 3: AdminRank = "Head Administrator";
case 4: AdminRank = "Server Owner";
}
format(str, sizeof(str), "{%06x}%s(%d) Statistics:\n\n\"STEELBLUE\"> Registration Date: "GREY"%s\n\"STEELBLUE\"> Status: \"GREY\"Level %d\n\"STEELBLUE\"> Online Time: \"GREY\"%d hours and %d minutes\"STEELBLUE\"> EXP: \"GREY\"%d\n\"STEELBLUE\"> Cash: \"GREY\"$%d\n\"STEELBLUE\"> Kills: "GREY"%d\n\"STEELBLUE\">
Deaths: \"GREY\"%d\n\"STEELBLUE\"> Weapon Set: \"GREY\"%s", (GetPlayerColor(giveid) >>> 8), GetName(giveid), giveid, PlayerInfo[giveid][RegOn], AdminRank, PlayerInfo[giveid][Hours], PlayerInfo[giveid][Minutes], GetPlayerScore(giveid), GetPlayerMoney(giveid), PlayerInfo[giveid][Kills], PlayerInfo[giveid][Deaths], WeaponSet);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""RED"Statistics", str, "OK", "");
return 1;
}
(3194) : error 037: invalid string (possibly non-terminated string)
(3194) : error 017: undefined symbol "d"
(3194) : error 029: invalid expression, assumed zero
(3194) : fatal error 107: too many error messages on one line
there is no problem with ur script
pawn is crashing because spelling if parmas is wron You have written "params[]" change it to "parmas[]" and also change its spelling in sscaf line |
params[] isn't giving him an error in any way.
Silly question : Are you sure that this crash is causing because of this command? |