16.08.2015, 19:19
Here is a better view:
1- pPlayerPos is saving in a weird order, the array is saving as: [0] [1] [0]. I assume the z position should be [2].
2- Player[playerid][pSkin] is setting the 'pMoney' field, and there is no Skin field in the query itself.
3- Player[playerid][pvStatus] has no field too.
TIP: Let me ask you, why do you need to save the VIP stats, Admin stats or even the warnings and the reasons every single time you save the player? These variables never change unless in specific conditions which are not to common to be saved everytime you update the player.
Only save these when you change the variable ingame, its way better.
Код:
"UPDATE accounts SET pName = '%s', pPassword = '%s', pAdminLevel = %d, pPlayerPos = '%f %f %f', pMoney = %d, pVip = %d, pMuted = %d, pWarnings = %d, pWarningReasons = '%s|%s|%s' WHERE pid = %d", GetName(playerid), Player[playerid][pPassword], Player[playerid][pAdminLevel], Player[playerid][pPosition][0], Player[playerid][pPosition][1], Player[playerid][pPosition][0], Player[playerid][pSkin], Player[playerid][pMoney], Player[playerid][pvStatus], Player[playerid][pMuted], Player[playerid][pWarnings], Player[playerid][pWarningReason1], Player[playerid][pWarningReason2], Player[playerid][pWarningReason3], Player[playerid][pID]
2- Player[playerid][pSkin] is setting the 'pMoney' field, and there is no Skin field in the query itself.
3- Player[playerid][pvStatus] has no field too.
TIP: Let me ask you, why do you need to save the VIP stats, Admin stats or even the warnings and the reasons every single time you save the player? These variables never change unless in specific conditions which are not to common to be saved everytime you update the player.
Only save these when you change the variable ingame, its way better.