Problem in my vehicle system.
#5

Quote:
Originally Posted by Mean
Посмотреть сообщение
That means it doesn't match. Check those parameters again, and also, you need the string size in that "s", so it should be "p<|>is[24]iiiiiisfffii"

Keep trying until you get it correct. Oh also, these parameters must match the database, for example, in the database you have first two fields "owner" and "model," it won't work because the order of fields must be the same as the sscanf format, THE SAME, so you need to swap "model" with "owner" either in the sscanf format or in the database, so that makes it "model" and "owner."

Must be completely the same, also the fields you don't use, still need to be added to the sscanf format and later they need to be ignored. For example, if you have that sscanf format, and at the end of the table you still have a few fields, you still need to put them to the sscanf format, but not use them, or destroy them with "#pragma unused."

This is exactly why using native SQL functions is recommended.
pawn Код:
sscanf("p<|>iis[24]iiiiiis[15]fffi", vInfo[v][vID], vInfo[v][vModel], vInfo[v][vOwner], vInfo[v][vLocked], vInfo[v][vLock], vInfo[v][vAlarm], vInfo[v][vInsurance], vInfo[v][vColor1], vInfo[v][vColor2], vInfo[v][vPlate], vInfo[v][vX], vInfo[v][vY], vInfo[v][vZ], vInfo[v][vOwned]);
It still gives the warning
Код:
sscanf warning: Format specifier does not match parameter count.
And what do you mean SQL native functions? can you give me an example of this with the native MySQL functions?
Reply


Messages In This Thread
Problem in my vehicle system. - by printer - 14.01.2012, 13:27
Re: Problem in my vehicle system. - by Mean - 14.01.2012, 13:30
Re: Problem in my vehicle system. - by printer - 14.01.2012, 13:38
Re: Problem in my vehicle system. - by Mean - 14.01.2012, 14:06
Re: Problem in my vehicle system. - by printer - 14.01.2012, 15:58
Re: Problem in my vehicle system. - by Mean - 14.01.2012, 16:00
Re: Problem in my vehicle system. - by Mean - 14.01.2012, 16:03
Re: Problem in my vehicle system. - by printer - 14.01.2012, 16:32
Re: Problem in my vehicle system. - by Mean - 14.01.2012, 16:56
Re: Problem in my vehicle system. - by printer - 14.01.2012, 17:31

Forum Jump:


Users browsing this thread: 1 Guest(s)