Saving issue
#1

Hello... Recently I've been getting a lot of bug reports on my currently released MySQL script. I was able to fix some of the problems with crashing upon performing commands, but this one I have no idea what's wrong. I was able to locate the issue and it's this custom callback that I've got.

pawn Код:
stock SavePlayerAccount(playerid)
{
    new String[255], Float: health, Float: armour;
    if( PlayerStatistics[playerid][pAuth] == 1)
    {
        format(String, sizeof(String), "UPDATE `Accounts` SET `Password` = '%s', `AdminLevel` = '%d', `Money` = '%d', `BankMoney` = '%d', `Score` = '%d', `Skin` = '%d' WHERE `UserID` = '%d'", PlayerStatistics[playerid][pPassword], PlayerStatistics[playerid][pAdminLevel], GetPlayerMoney(playerid), PlayerStatistics[playerid][pBankMoney], GetPlayerScore(playerid), GetPlayerSkin(playerid), PlayerStatistics[playerid][pDatabaseID]);
        mysql_query(String);

        GetPlayerPos(playerid, PlayerStatistics[playerid][pPositionX], PlayerStatistics[playerid][pPositionY], PlayerStatistics[playerid][pPositionZ]);
        GetPlayerHealth(playerid, health);
        GetPlayerArmour(playerid, armour);
        format(String, sizeof(String), "UPDATE `Accounts` SET `Health` = '%f', `Armour` = '%f', `PositionX` = '%f', `PositionY` = '%d', `PositionZ` = '%d' WHERE `UserID` = '%d'", health, armour, PlayerStatistics[playerid][pPositionX], PlayerStatistics[playerid][pPositionY], PlayerStatistics[playerid][pPositionZ], PlayerStatistics[playerid][pDatabaseID]);
        mysql_query(String);
    }
    return 1;
}
Can anybody see anything wrong with that? I'll show you more as you need it.
Reply


Messages In This Thread
Saving issue - by Scenario - 19.10.2010, 13:46
Re: Saving issue - by Scenario - 20.10.2010, 17:03
Re: Saving issue - by Calgon - 20.10.2010, 17:50
Re: Saving issue - by Scenario - 20.10.2010, 18:01
Re: Saving issue - by Calgon - 20.10.2010, 18:16
Re: Saving issue - by Scenario - 20.10.2010, 18:20
Re: Saving issue - by Scenario - 20.10.2010, 18:34
Re: Saving issue - by Calgon - 20.10.2010, 18:34
Re: Saving issue - by Scenario - 21.10.2010, 23:40
Re: Saving issue - by Grim_ - 22.10.2010, 00:59

Forum Jump:


Users browsing this thread: 1 Guest(s)