Optional specifiers - SSCANF - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Optional specifiers - SSCANF (
/showthread.php?tid=571324)
Optional specifiers - SSCANF -
CrashCar - 17.04.2015
Hi.
Код:
sscanf(params,"I(100)",health);
"I (uppercase)" represents an optional specifier value of 100 by default.
Код:
input = "1 2";
sscanf(input, "A<i>(3)[4]", arr);
//<i>?
What does this code?, What is <i>?
Re: Optional specifiers - SSCANF -
Jefff - 17.04.2015
integer same as
new value;
sscanf(params,"i",value);
Re: Optional specifiers - SSCANF -
Crayder - 17.04.2015
Quote:
Originally Posted by Jefff
integer same as
new value;
sscanf(params,"i",value);
|
No, altogether it is:
A<i> 'array of integers'
(3) 'default of 3'
[4] '4 values'
This [sscanf("1 2", "A<i>(3)[4]", arr);] would produce and array of integers 1, 2, 3, and 3.
Respuesta: Re: Optional specifiers - SSCANF -
CrashCar - 18.04.2015
Quote:
Originally Posted by Crayder
No, altogether it is:
A<i> 'array of integers'
(3) 'default of 3'
[4] '4 values'
This [sscanf("1 2", "A<i>(3)[4]", arr);] would produce and array of integers 1, 2, 3, and 3.
|
Got it thanks.
Out of curiosity, Can you give another example code concerning that ?. Please.