SA-MP Forums Archive
Problem with sscanf - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with sscanf (/showthread.php?tid=164722)



Problem with sscanf - Ptasior - 01.08.2010

I've got that error:
Quote:

sscanf warning: String buffer overflow.

And when i log in server going crash.

I think, problem is in this part:
Код:
     sscanf(query, "p<|>iis[24]s[32]iiiiiiiiiifffs[512]",
  PlayerInfo[playerid][guid],
  PlayerInfo[playerid][player_uid],
  PlayerInfo[playerid][nick],
  PlayerInfo[playerid][pass],
  PlayerInfo[playerid][aj],
  PlayerInfo[playerid][bw],
  PlayerInfo[playerid][skin],
  PlayerInfo[playerid][sex],
  PlayerInfo[playerid][age],
  PlayerInfo[playerid][pdp],
  PlayerInfo[playerid][prisontime],
  PlayerInfo[playerid][cash],
  PlayerInfo[playerid][cashinbank],
     PlayerInfo[playerid][ban],
     PlayerInfo[playerid][pos_x],
     PlayerInfo[playerid][pos_y],
     PlayerInfo[playerid][pos_z],
Any1 know reason? Thanks.


Re: Problem with sscanf - Vince - 01.08.2010

What's supposed to go in the string size 512?