08.01.2015, 16:20
always remember that if there is a string you need to use it like this
examples
not like this
here fix for update
tell me if there again error ouccors
examples
pawn Код:
Language = '%s'
pawn Код:
Language = %s
pawn Код:
public OnPlayerSave(playerid) {
new Query[500], string[500];
format(string, sizeof(string), "UPDATE `players` SET `Language` = '%s', `Money` = %d, `XP` = %d, `Total XP` = %d, `Level` = %d, `VIP Level` = %d, `Admin Level` = %d, `Kills` = %d, `Deaths` = %d");
strcat(string, "`Muted` = '%s', `Mute TimeStamp` = '%s', `Mute Reason` = '%s', `Freezed` = '%s', `Freeze TimeStamp` = '%s', `Freeze Reason` = '%s', `Jailed` = '%s', `Jail TimeStamp` = '%s', `Jail Reason` = '%s'");
strcat(string, "`Banned` = '%s', `Ban TimeStamp` = '%s', `Ban Reason` = '%s', `Warns` = %d, `Warn Reason 1` = '%s', `Warn Reason 2` = '%s', `Warn Reason 3` = '%s', `Warn Reason 4` = '%s', `Warn Reason 5` = '%s'");
mysql_format(mysql_handle, Query, sizeof(Query), string,
PlayerInfo[playerid][pLanguage], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pXP], PlayerInfo[playerid][pTotalXP], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pVIPLevel], PlayerInfo[playerid][pAdminLevel], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths],
PlayerInfo[playerid][pMuted], PlayerInfo[playerid][pMuteTime], PlayerInfo[playerid][pMuteReason], PlayerInfo[playerid][pFreezed], PlayerInfo[playerid][pFreezeTime], PlayerInfo[playerid][pFreezeReason], PlayerInfo[playerid][pJailed], PlayerInfo[playerid][pJailTime], PlayerInfo[playerid][pJailReason],
PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pBanTime], PlayerInfo[playerid][pBanReason], PlayerInfo[playerid][pWarns], PlayerInfo[playerid][pWarnReason1], PlayerInfo[playerid][pWarnReason2], PlayerInfo[playerid][pWarnReason3], PlayerInfo[playerid][pWarnReason4], PlayerInfo[playerid][pWarnReason5]);
mysql_tquery(mysql_handle, Query, "", "");
return 1;
}