[Tutorial] Explanation for sscanf2 and ZCMD
#9

Quote:
Originally Posted by admantis
Посмотреть сообщение
Introduction
You can't have this:

pawn Код:
new string[64];
if (sscanf(params, "s[32]")) return 1;
Since 64 is not 32.
You CAN do that, since the size you have to specify is not the size of the array but the size of the input you are expecting to go through the function. In both cases, if the size of the input is greater than the size you specified, the server console will give you a warning.

Quote:
Originally Posted by admantis
Посмотреть сообщение
Sorry about my errors, but I meant zcmd as the processor and sscanf2 as the tool to split the parameters.

Also that code 'ammount' is meant to be a float, because armour ammounts are floats, not integers.
It should be:
pawn Код:
new Float:ammount;
Reply


Messages In This Thread
Explanation for sscanf2 and ZCMD - by admantis - 27.02.2011, 00:48
Re: Explanation for sscanf2 and ZCMD - by Hal - 27.02.2011, 01:44
Re: Explanation for sscanf2 and ZCMD - by Retardedwolf - 27.02.2011, 02:14
Re: Explanation for sscanf2 and ZCMD - by [L3th4l] - 27.02.2011, 02:18
Re: Explanation for sscanf2 and ZCMD - by Hiddos - 27.02.2011, 12:02
Re: Explanation for sscanf2 and ZCMD - by admantis - 27.02.2011, 15:02
Re: Explanation for sscanf2 and ZCMD - by Calgon - 27.02.2011, 15:05
Re: Explanation for sscanf2 and ZCMD - by admantis - 27.02.2011, 15:06
Re: Explanation for sscanf2 and ZCMD - by Miguel - 27.02.2011, 15:18
Re: Explanation for sscanf2 and ZCMD - by admantis - 27.02.2011, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)