28.09.2014, 20:21
I have:
I made several of printf PlayerInfo[playerid][pArmure].
Let's say the value is 10 in the database, I can try to change it into play, it will not change, and it will always be 10 in the database.
So the code must be bugged ...
pawn Код:
forward OnPlayerUpdateSQL(playerid);
public OnPlayerUpdateSQL(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pReg] == 0)
{
return 1;
}
if(joueurconnecte[playerid] == 1)
{
new query[1024];
mysql_format(mysql, query, 1024, "UPDATE srp_players_stats SET Armure='%f', PlayerLevel=%d, AdminLevel=%d, Registered=%d, Sex=%d, Blanc=%d, Origin=%d, Money=%d, Bank=%d, SuspendedTime=%d, Job=%d, Jailed=%d, JailTime=%d, Member=%d, Rank=%d, Chara=%d, pHealth='%f', Inte=%d, Model=%d, PhoneNr=%d WHERE id=%d",
PlayerInfo[playerid][pArmure],
PlayerInfo[playerid][pLevel],
PlayerInfo[playerid][pAdmin],
PlayerInfo[playerid][pReg],
PlayerInfo[playerid][pSex],
PlayerInfo[playerid][pBlanc],
PlayerInfo[playerid][pOrigin],
PlayerInfo[playerid][pCash],
PlayerInfo[playerid][pAccount],
PlayerInfo[playerid][pSuspendedTime],
PlayerInfo[playerid][pJob],
PlayerInfo[playerid][pJailed],
PlayerInfo[playerid][pJailTime],
PlayerInfo[playerid][pMember],
PlayerInfo[playerid][pRank],
PlayerInfo[playerid][pChar],
PlayerInfo[playerid][pHealth],
PlayerInfo[playerid][pInt],
PlayerInfo[playerid][pModel],
PlayerInfo[playerid][pPnumber],
PlayerInfo[playerid][pSQLID]);
mysql_tquery(mysql, query);
// ...
}
}
return 1;
}
Let's say the value is 10 in the database, I can try to change it into play, it will not change, and it will always be 10 in the database.
So the code must be bugged ...