Sscanf problem - 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: Sscanf problem (
/showthread.php?tid=626193)
Sscanf problem -
Barnwell - 11.01.2017
does anyone got the W*RP sscanf2? 2.8.2
The one with playerid,params
Examble: if(!sscanf(playerid,params,"k<gunLookup>",gunid)) {
Re: Sscanf problem -
YouHack - 11.01.2017
1 off topic question.
Why you post fake links in your signature?
" GET FREE SERVER WITH HOSTED! " redirects to CS 1.6 vid -_- .
On topic: Use ****** before posting.
Re: Sscanf problem -
Yaa - 11.01.2017
Quote:
Originally Posted by Barnwell
does anyone got the W*RP sscanf2? 2.8.2
The one with playerid,params
Examble: if(!sscanf(playerid,params,"k<gunLookup>",gunid)) {
|
nah we are in 2017 we still using sscanf 2.8.2
Re: Sscanf problem - iLearner - 11.01.2017
Quote:
Originally Posted by Yaa
nah we are in 2017 we still using sscanf 2.8.2
|
And... what do you use... your majesty?
Re: Sscanf problem -
Yaa - 12.01.2017
Quote:
Originally Posted by iLearner
And... what do you use... your majesty?
|
Quote:
Originally Posted by Yaa
"we still using sscanf 2.8.2"
|
fix your eyes :/
Re: Sscanf problem -
saffierr - 12.01.2017
And why would you do
PHP код:
if(!sscanf(params...
Just use it without the '!'.
Re: Sscanf problem -
Lordzy - 12.01.2017
Quote:
Originally Posted by saffierr
And why would you do
PHP код:
if(!sscanf(params...
Just use it without the '!'.
|
What's the problem with it? It's up to the coder who would decide what should be if it returns 0.
OT : sscanf is basically used for splitting/formatting purposes. I assume the game mode is using usual sscanf v2.8.2 which can be found on plugins section.
Re: Sscanf problem -
saffierr - 12.01.2017
Quote:
Originally Posted by Lordzy
What's the problem with it? It's up to the coder who would decide what should be if it returns 0.
OT : sscanf is basically used for splitting/formatting purposes. I assume the game mode is using usual sscanf v2.8.2 which can be found on plugins section.
|
Did I say that there was a problem?
No, as I thought, I just pointed something out.
It was a simple suggestion, nothing more.
Know your facts.
Re: Sscanf problem -
Lordzy - 12.01.2017
Quote:
Originally Posted by saffierr
Did I say that there was a problem?
No, as I thought, I just pointed something out.
It was a simple suggestion, nothing more.
|
Can you be brief about why are you suggesting so? You do realise that you can get it to work even by checking if it returns 0 or not. When sscanf returns 0, it's considered to be as a success. I already stated that it's up to the coder to choose according to what they're doing.
pawn Код:
if(sscanf(...))
print("hi");
else
print("cya");
//is equal to
if(!sscanf(...))
print("cya");
else
print("hi");
Quote:
Originally Posted by saffierr
Know your facts.
|
I don't know why but this made me giggle.
Re: Sscanf problem -
saffierr - 12.01.2017
Quote:
Originally Posted by Lordzy
Can you be brief about why are you suggesting so? You do realise that you can get it to work even by checking if it returns 0 or not. When sscanf returns 0, it's considered to be as a success. I already stated that it's up to the coder to choose according to what they're doing.
pawn Код:
if(sscanf(...)) print("hi"); else print("cya");
//is equal to if(!sscanf(...)) print("cya"); else print("hi");
I don't know why but this made me giggle.
|
Hm, good to hear it made you giggle
And, yes I know both are equal, but I just simply suggested it to avoid unnecessary brackets/long codes.
Nothing else, lol.