13.03.2012, 19:24
Errors at debug :
This happens when i save player data..
I have correctly connected GM to MYSQL.. Login works fine, but saving not.
Код:
[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)
Код:
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; }