19.10.2010, 13:46
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.
Can anybody see anything wrong with that? I'll show you more as you need it.
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;
}