02.04.2013, 17:54
Hi.I'm converting my gangwars strcmp commands to zcmd.I have a big problem.I get this error on server console when i use command /f
this is my command
Код:
sscanf warning: format specifier does not match parameter count
pawn Код:
CMD:f(playerid,params[])
{
new result[256], string[256];
new team = gTeam[playerid];
if(sscanf(params, "rs[256]", result)) return SendClientMessage(playerid, COLOR_GRAD1, "Usage: (/f)action [team chat]" );
else
{
new ranktext[256];
switch(PlayerInfo[playerid][pRank])
{
case 1: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank1]);
case 2: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank2]);
case 3: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank3]);
case 4: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank4]);
case 5: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank5]);
case 6: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank6]);
}
if(PlayerInfo[playerid][fMute] == 1) return SendClientMessage(playerid,COLOR_RED,"You are muted in faction chat!");
else
{
if(PlayerInfo[playerid][pRank] < 6)
{
format(string, sizeof(string), "%s(%d) %s(%d) : %s", ranktext, PlayerInfo[playerid][pRank], PlayerName(playerid),playerid, result);
SendFactionMessage(team, COLOR_GREEN, string);
return 1;
}
if(PlayerInfo[playerid][pRank] == 6)
{
format(string, sizeof(string), "%s(%d) %s(%d) : %s", ranktext, PlayerInfo[playerid][pRank], PlayerName(playerid),playerid, result);
SendFactionMessage(team, COLOR_RED, string);
return 1;
}
}
}
return 1;
}