Mysql ERROR
#1

Errors at debug :
Код:
[19:46:06] CMySQLHandler::Query(SELECT id FROM kasutajad WHERE LOWER(kasutaja) = LOWER('Renn477') LIMIT 1) - Successfully executed.
[19:46:06] >> mysql_num_rows( Connection handle: 1 )
[19:46:06] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
[19:46:06] >> mysql_fetch_row_format( Connection handle: 1 )
[19:46:06] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
This happens when i save player data..
Код:
public OnPUpdate(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(LoggedIn[playerid] == true)
		{
   			MySQLCheckConnection();
			new playername[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername, sizeof(playername));
			new query[1024];
			PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
			PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
			format(query, sizeof(query), "UPDATE kasutajad SET raha=%d, skin=%d, kills=%d, deaths=%d, admin=%d, lukus=%d WHERE kasutaja = %s",PlayerInfo[playerid][pCash], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pLukus], playername);
			mysql_query(query);
		}
	}
	return 1;
}
I have correctly connected GM to MYSQL.. Login works fine, but saving not.
Reply


Messages In This Thread
Mysql ERROR - by Renks554 - 13.03.2012, 19:24
Re: Mysql ERROR - by Lee_Percox - 13.03.2012, 19:28

Forum Jump:


Users browsing this thread: 4 Guest(s)