forward SaveAccountStats(playerid);
public SaveAccountStats(playerid)
{
if(Logged[playerid] == 1)
{
new query[1280];
mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `Money`=%d, `Admin`=%d, `Vip`=%d, `Kills`=%d, `Deaths`=%d, `Score`=%d, `Rank`=%d, `Banned`=%d, `Warns`=%d, ",\
PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVip], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pScore], PlayerInfo[playerid][pRank], PlayerInfo[playerid][pBanned],\
PlayerInfo[playerid][pWarns]);
mysql_format(mysql, query, sizeof(query), "%s`VW`=%d, `Interior`=%d, `Min`=%d, `Hours`=%d, `PM`=%d, `Color`=%d, `Turfs`=%d, `Clan`=%d, ",\
query, PlayerInfo[playerid][pVW], PlayerInfo[playerid][pInt], PlayerInfo[playerid][pMin], PlayerInfo[playerid][pHour], PlayerInfo[playerid][pPM], PlayerInfo[playerid][pColor], PlayerInfo[playerid][pTurfs], PlayerInfo[playerid][pClan]);
mysql_format(mysql, query, sizeof(query), "%s`ClRank`=%d, `ClLeader`=%d, `Invited`=%d, `Inviting`=%d WHERE `ID`=%d",\
query, PlayerInfo[playerid][pClRank], PlayerInfo[playerid][pClLeader], PlayerInfo[playerid][pInvited], PlayerInfo[playerid][pInviting], PlayerInfo[playerid][pID]);
mysql_tquery(mysql, query, "", "");
return 1;
}
return 0;
}
[DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving.
I see, either way it's not saving the players stats because it's skipping the save.
|
"Skipping result saving" just means that it doesn't generate a cache (for use with cache_ functions). Have you actually checked the database?
|
You should use strcat instead of mysql_format to 'create' your query and at the end, use mysql_format to format your query.
|
no callback specified, skipping result saving
It worked before, I'm not sure why it won't save the players stats.
PHP код:
|
mysql_tquery(mysql, query, "RandomPublic", ""); // ... forward RandomPublic(); public RandomPublic() { }