14.01.2012, 15:58
Quote:
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]);
Код:
sscanf warning: Format specifier does not match parameter count.