sscanf question about format codes
#1

Uhh I'm not shure how to explain this. Is it possible to skip one format code, like if I split MySQL row and I don't won't to load the third field.

Example:

The result line would be like

Код:
field1|field2|field3|field4|field5...
Lets say that the first two fields are strings and the rest of them are interger.

And I only want to load fields 1, 2, 4, 5... but not the third one.

Код:
sscanf(resultline, "ssddd", var1, var2, var3, var4, var5...
But what I'm trying to do is

Код:
sscanf(resultline, "ss(d)dd", var1, var2, var4, var5...
(d) - What should be there instead of d?

I tried to search but I did not get any results about this, and I tried to put something like this

Код:
sscanf(resultline, "ss dd", var1, var2, var4, var5...
or

Код:
sscanf(resultline, "ss0dd", var1, var2, var4, var5...
but it was not working.

Basicly what I'm trying is when I load the player I don't won't to load for example his password, ip, ban status because they are already loaded in some other part of the script.

I hope you understand what I mean...
Reply


Messages In This Thread
sscanf question about format codes - by Dujma - 28.11.2009, 16:35
Re: sscanf question about format codes - by diesulke - 28.11.2009, 16:54
Re: sscanf question about format codes - by UsaBoy91 - 28.11.2009, 17:10
Re: sscanf question about format codes - by Dujma - 28.11.2009, 17:12

Forum Jump:


Users browsing this thread: 3 Guest(s)