Issue with MySQL saving
#1

Hi all.

Under OnPlayerDisconnect I call the function
pawn Код:
SavePlayer(playerid);
This is the SavePlayer function.

pawn Код:
SavePlayer(playerid)
{
    new DB_Query[256];

    mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `PLAYERS` SET `SCORE` = %d, `KILLS` = %d, `CASH` = %d, `DEATHS` = %d, `ADMIN` = %d, `SKIN` = %d, `TOKENS` = %d, `DONATOR` = %d, `NAMECHANGES` = %d, `HEADSHOTS`= %d WHERE `ID` = %d LIMIT 1",
    pInfo[playerid][Score], pInfo[playerid][Kills], pInfo[playerid][Cash], pInfo[playerid][Deaths], pInfo[playerid][Admin], pInfo[playerid][Skin], pInfo[playerid][Tokens], pInfo[playerid][Donator], pInfo[playerid][Namechanges], pInfo[playerid][Headshots], pInfo[playerid][ID]);
    mysql_tquery(Database, DB_Query);
    return 1;

}
Often it saves, but randomly on restarts and at other times it will wipe my statistics. Any ideas?
Reply


Messages In This Thread
Issue with MySQL saving - by Jing_Chan - 03.08.2018, 12:46
Re: Issue with MySQL saving - by GRiMMREAPER - 03.08.2018, 12:57
Re: Issue with MySQL saving - by Jing_Chan - 03.08.2018, 15:11
Re: Issue with MySQL saving - by Banditul18 - 03.08.2018, 15:14

Forum Jump:


Users browsing this thread: 1 Guest(s)