sscanf format specifier -
fuem1907 - 05.04.2013
Hello, I get this error when I open my server. What can I do to fix?
Re: sscanf format specifier -
stabker - 05.04.2013
Quote:
Originally Posted by fuem1907
Hello, I get this error when I open my server. What can I do to fix?

|
Show your
OnGameModeInit public, please
Re: sscanf format specifier -
fuem1907 - 06.04.2013
this is what you need?
Re: sscanf format specifier -
Basssiiie - 06.04.2013
"Format specifier does not match parameter count" means that you have more or less parameters than specified.
This code will cause the same error:
Код:
sscanf(string, "ii", integer1, integer2, integer3);
Because there are more parameters (3 in total) than there are specifiers ("ii" are the specifiers, there are only two of them).
Re: sscanf format specifier -
fuem1907 - 06.04.2013
Thing is there are bunch of sscanf parameters. Anyway to find it quickly?
Example: I got these
if(sscanf(params, "iI(-1)I(-1)", iVehicle, iColors[0], iColors[1]))
sscanf(szFileStr, "p<|>iis[8]s[24]ffffffiiiiiffd",
BusinessInfo[iIndex][bOwned],
BusinessInfo[iIndex][bLevel],
BusinessInfo[iIndex][bDescription],
BusinessInfo[iIndex][bOwner],
BusinessInfo[iIndex][bExteriorX],
BusinessInfo[iIndex][bExteriorY],
BusinessInfo[iIndex][bExteriorZ],
BusinessInfo[iIndex][bInteriorX],
BusinessInfo[iIndex][bInteriorY],
BusinessInfo[iIndex][bInteriorZ],
BusinessInfo[iIndex][bLock],
BusinessInfo[iIndex][bPrice],
BusinessInfo[iIndex][bPickupID],
BusinessInfo[iIndex][bCustomInterior],
BusinessInfo[iIndex][bCustomExterior],
BusinessInfo[iIndex][bExteriorA],
BusinessInfo[iIndex][bInteriorA],
BusinessInfo[iIndex][bInt]
is that wrong?
Re: sscanf format specifier -
Basssiiie - 06.04.2013
I don't think that's the wrong one. Try posting all of the sscanf functions used near the server launch (OnGameModeInit, OnFilterScriptInit etc..), maybe we can find the one which is causing this trouble.
Re: sscanf format specifier -
fuem1907 - 06.04.2013
What about the error that is shown in the picture? Could not connect to YSI update server thing? And what happens If I run my server like this? with those errors?
Re: sscanf format specifier -
Basssiiie - 06.04.2013
On server launch, YSI tries to connect to ******' website to check for updates. If it could connect, it'll report if an update is released. If it couldn't connect, it'll report this. It doesn't have any effect on your server, it just reports if there are any updates. Don't worry about it.
Re: sscanf format specifier -
fuem1907 - 06.04.2013
Lol thanks, finally, about the parameter warnings, does it effects how my server works or anything?
Re: sscanf format specifier -
Basssiiie - 06.04.2013
It might affect the scripts where the problem-causing sscanf is located. Other sscanf-functions will still work fine, but the error-reporting one might not get the information properly saved into the variables. My suggestion is to debug every sscanf with 'print' and/or 'printf' to find the one which is causing these errors.