SA-MP Forums Archive
sscanf warning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: sscanf warning (/showthread.php?tid=469700)



sscanf warning - Blademaster680 - 14.10.2013

Hi

I am getting this warning when I start my server and it spams the whole server log. I have updated all my plugins and includes but this started occurring when I added a Filterscript code into my gamemode's code and I cant seem to fix this and I cant see were the problem is.
Код:
[15:02:12] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
Has anyone else had this problem and know how to fix it?
THanks


Re: sscanf warning - TonyII - 14.10.2013

You most likely got something like this in your script, p<|> or something else but it should be like this p<,>


Re: sscanf warning - Blademaster680 - 14.10.2013

This is the only thing that I have with "p<"
Код:
(new p=0; p<MAX_VEHICLES; p++)
Could that be the problem and if so how would I fix it?


Re: sscanf warning - TonyII - 14.10.2013

Do you use sscanf to load some files? If so post the code


Re: sscanf warning - Blademaster680 - 14.10.2013

Код:
if(sscanf(params, "ui", giveplayerid, fac)) return SendClientMessage(playerid, -1, "USAGE: /makeleader [playerid/partofname] [faction]");
Stuff like that


Re: sscanf warning - TonyII - 14.10.2013

Like this.
pawn Код:
if (sscanf(szFileLine, "p<=>s[8]s[32]", szIniName, szIniValue))
{
    printf("Invalid INI format line");
}
https://sampforum.blast.hk/showthread.php?tid=120356


Re: sscanf warning - Blademaster680 - 14.10.2013

Код:
else if(strcmp(key, "Pos") == 0) sscanf(line[s], "p,ffff", VehiclePos[i][0], VehiclePos[i][1],
				VehiclePos[i][2], VehiclePos[i][3]);
			else if(strcmp(key, "Colors") == 0) sscanf(line[s], "p,dd", VehicleColor[i][0], VehicleColor[i][1]);



Re: sscanf warning - TonyII - 14.10.2013

pawn Код:
else if(strcmp(key, "Pos") == 0) sscanf(line[s], "p<,>ffff", VehiclePos[i][0], VehiclePos[i][1],
                VehiclePos[i][2], VehiclePos[i][3]);
            else if(strcmp(key, "Colors") == 0) sscanf(line[s], "p<,>dd", VehicleColor[i][0], VehicleColor[i][1]);



Re: sscanf warning - Blademaster680 - 14.10.2013

Thank you it fixed it. +Rep