Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

What am I doing wrong? (SSCANF, 1 line mistake)

$
0
0
Haven't needed to ask for help in a while, but I'm stuck with 1 line of SSCANF.

Code:

new RadioID, bracket[1]; //MySQL Radio ID
sscanf(inputtext, "ds[1]", RadioID, bracket);

Basically, I've got a dialog in the format of:

1) Text here (RadioID should be = 1)
2) More text here (RadioID should be = 2)
3) Even more here (RadioID should be = 3)
55) more and more (RadioID should be = 55)


I am trying to split the number at the beginning, and put it in the variable 'RadioID'.

With the above code, The 'RadioID' shows as 0. It doesn't work.


What am I doing wrong? (I've never really understood what all the sscanf <|> etc means, so thought it'd be best to ask.)

Thanks! will +rep

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>