02.04.2011, 19:35
Hey there, i have little prob. I want 2 make /mute <id/nick> <lenght(optional)> <reason(optional)> command. I have this:
i want sth like this:
if is set only ID - mute player for no reason, 5 minuntes.
if is set time, but no reason - mute player for XX Time, with no reason.
if is set reason, but not time - mute player for 5 minutes with reason.
But when i do that, it doesn't work correctly. There are some warnings from console:
etc. Any ideas? :\
Код:
sscanf(params,"rI(5)S[50]",ID,time,reason);
if is set only ID - mute player for no reason, 5 minuntes.
if is set time, but no reason - mute player for XX Time, with no reason.
if is set reason, but not time - mute player for 5 minutes with reason.
But when i do that, it doesn't work correctly. There are some warnings from console:
Quote:
[21:31:11] sscanf warning: No default value found. [21:31:11] sscanf warning: Strings without a length are deprecated, please add a destination size. [21:31:11] sscanf warning: Format specifier does not match parameter count. [21:29:53] sscanf warning: Unknown format specifier '[', skipping. [21:29:53] sscanf warning: Unknown format specifier ']', skipping. [21:24:38] sscanf warning: Unknown format specifier '[', skipping. [21:24:38] sscanf warning: Unknown format specifier '5', skipping. [21:24:38] sscanf warning: Unknown format specifier '0', skipping. [21:24:38] sscanf warning: Unknown format specifier ']', skipping. |