SA-MP Forums Archive
sscanf mysql loading. - 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 mysql loading. (/showthread.php?tid=454234)



sscanf mysql loading. - audriuxxx - 28.07.2013

Hi,

Can i use one string in all my loadings? like:

Код:
new LoadingString[ MAX_PLAYERS ][ 1500 ];

new STRINGWW[ 500 ];
format(STRINGWW500,"SELECT Connectioninfo FROM lastconnect WHERE PlayerName='%s' ORDER BY cdate DESC LIMIT 1", GetPlayerNameEx[ playerid ] );
	mysql_query( STRINGWW );
	mysql_store_result();
	new CONNINFO[ 100 ];

	if( mysql_num_rows( ) )
	{
 		if( mysql_fetch_row_format( LoadingString[ playerid ]  ) )
		{
			sscanf(LoadingString[ playerid ],"p<|>s[80]",CONNINFO );

			format(STRINGWW,128,"{34A934}%s", CONNINFO );
 			SendClientMessage( playerid, -1, STRINGWW);
 		}
}
And i think here is bug in sscanf, when i load a lot of things, then in some variables value is wrong. When i do 2 loading, then ok.