16.04.2012, 20:39
The command works fine but server logs warning:
Command
And BTW as soon as I created a sscanf command all my other normal strcmp commands dont work, is it possible to get both working? or do I have to remake them to sscanf as well?
Код:
[21:41:59] sscanf warning: No default value found. [21:41:59] sscanf warning: Unknown format specifier '[', skipping. [21:41:59] sscanf warning: Unknown format specifier '2', skipping. [21:41:59] sscanf warning: Unknown format specifier '5', skipping. [21:41:59] sscanf warning: Unknown format specifier '6', skipping. [21:41:59] sscanf warning: Unknown format specifier ']', skipping. [21:41:59] sscanf warning: Format specifier does not match parameter count. [21:42:02] sscanf warning: No default value found. [21:42:04] sscanf warning: No default value found. [21:42:05] sscanf warning: No default value found. [21:42:06] sscanf warning: No default value found. [21:42:15] sscanf warning: No default value found. [21:42:24] sscanf warning: No default value found.
pawn Код:
CMD:aj(playerid,params[])
{
new target, time, reason[64], string[256];
if(sscanf(params,"udS[256]",target,time,reason))
{
return SendClientMessage(playerid,COLOR_GREEN,"USAGE: /aj [playerid] [time] [reason]");
}
else
{
format(string, sizeof(string), "AJ Time: %d, AJ Reason: %s",time,reason);
SendClientMessage(target, COLOR_LIGHTBLUE, string);
}
return 1;
}