mySQL_get_Field - 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: mySQL_get_Field (
/showthread.php?tid=488862)
mySQL_get_Field -
audriuxxx - 19.01.2014
Hi,
Why when i use mysql_get_Field, my server crashed?
Re: mySQL_get_Field -
Flake. - 19.01.2014
Can you show us the code around "mysql_get_Field()"
Re: mySQL_get_Field -
audriuxxx - 19.01.2014
Code:
new stringgaasss[ 200 ];
new STRINGLOADDDING[ 300];
format( stringgaasss, 200,"SELECT * FROM players WHERE Name='%s'", GetPlayerNameEx[ playerid ] );
mysql_query( stringgaasss );
mysql_store_result( );
new REALPLAYERNAME[ 25 ];
new PLAYERXP[ 15 ];
if( mysql_num_rows( ) )
{
if( mysql_fetch_row_format( STRINGLOADDDING ) )
{
mysql_get_field("Name",REALPLAYERNAME);
mysql_get_field("XP",PLAYERXP);
}
new blablabla[ 200 ];
format( blablabla, 128,"%s %d", REALPLAYERNAME, strval( PLAYERXP ) );
SendClientMessage( playerid, -1,blablabla);
}
mysql_free_result( );
I try with sscanf, it work. But i want to do with mysql_get_field, or with same doing function. But the problem, why server crashed, why this function what problems is?
Re: mySQL_get_Field -
audriuxxx - 21.01.2014
UP thread,
Re: mySQL_get_Field -
icra - 01.07.2014
Happens to me too.
Did you fixed this?