Problem with loading SQL
#1

So saving my SQL works perfectly fine. But when I load it in it adds the number 48 to each var (except the password, username and money vars). For the money, it makes it some random number, most noticeably 57. I don't understand what I did wrong. They're all integers.

Code:
stock LoginPlayer( playerid )
{
	new query[128], pName[MAX_PLAYER_NAME];
	GetPlayerName( playerid, pName, sizeof( pName ) );
	
	format( query, sizeof( query ), "SELECT * FROM accounts WHERE Name = '%s'", pName );
	mysql_query( query );
	mysql_store_result();
	
	while( mysql_fetch_row_format( query, "|" ) ) {
	    mysql_fetch_field_row( Player[playerid][Name], "Name" );
	    mysql_fetch_field_row( Player[playerid][Password], "Password" );
	    mysql_fetch_field_row( Player[playerid][Kills], "Kills" );
	    mysql_fetch_field_row( Player[playerid][Deaths], "Deaths" );
	    mysql_fetch_field_row( Player[playerid][AdminLvl], "AdminLvl" );
	    mysql_fetch_field_row( Player[playerid][Money], "Money" );
	}
	
	GivePlayerMoney( playerid, Player[playerid][Money] );
}
Reply


Messages In This Thread
Problem with loading SQL - by GlorifiedPig - 29.12.2017, 15:20
Re: Problem with loading SQL - by GlorifiedPig - 03.01.2018, 20:29
Re: Problem with loading SQL - by GlorifiedPig - 10.01.2018, 08:49
Re: Problem with loading SQL - by Misiur - 10.01.2018, 08:56
Re: Problem with loading SQL - by GlorifiedPig - 10.01.2018, 15:41

Forum Jump:


Users browsing this thread: 1 Guest(s)