sscanf help please!
#1

Never mind.. I'll try to figure it out myself... somehow.....
Reply
#2

Get a string tokemizer/manipulator/whatever (i suggest sscanf), a do something like this
pawn Код:
new Gangs[4][256]
sscanf(dini_Get(Gangs.info,"Gangs"), "ssss", Gangs[0], Gangs[1], Gangs[2], Gangs[3]);
In this case strtok may actually be better, since you can loop it
Reply
#3

Quote:
Originally Posted by dice7
Get a string tokemizer/manipulator/whatever (i suggest sscanf), a do something like this
pawn Код:
new Gangs[4][256]
sscanf(dini_Get(Gangs.info,"Gangs"), "ssss", Gangs[0], Gangs[1], Gangs[2], Gangs[3]);
In this case strtok may actually be better, since you can loop it
Thanks, I'll try it
Reply
#4

I cannot get it to work...
You made some errors in code, I've fixed them but I get these errors:
.inc(31) : error 001: expected token: ")", but found "("
.inc(31) : warning 215: expression has no effect

pawn Код:
new Gangs[4][256];
sscanf(dini_Get("Gangs.info","Gangs"), "ssss", Gangs[0], Gangs[1], Gangs[2], Gangs[3]);
Reply
#5

It's missing a closing )

pawn Код:
new Gangs[4][256];
scanf(dini_Get("Gangs.info","Gangs"), "ssss", Gangs[0], Gangs[1], Gangs[2], Gangs[3]));
Reply
#6

Quote:
Originally Posted by Zamaroht
It's missing a closing )


new Gangs[4][256];
scanf(dini_Get("Gangs.info","Gangs"), "ssss", Gangs[0], Gangs[1], Gangs[2], Gangs[3]));
No it doesn't.. :P
Reply
#7

Woops my bad, ignore me.
Reply
#8

Then there's an error in one of your includes
Quote:
Originally Posted by SiJ
You made some errors in code, I've fixed them but I get these errors:
.inc(31) : error 001: expected token: ")", but found "("
.inc(31) : warning 215: expression has no effect
Reply
#9

Quote:
Originally Posted by Joe Staff
Then there's an error in one of your includes
Quote:
Originally Posted by SiJ
You made some errors in code, I've fixed them but I get these errors:
.inc(31) : error 001: expected token: ")", but found "("
.inc(31) : warning 215: expression has no effect
That's because my sscanf code is in include..
Reply
#10

up to the sky!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)