23.05.2012, 08:52
Hello, I've got my SQL system, but it seems to save the wrong information in the wrong column on the SQL database...
I have:
It just doesn't save the right thing in the right place, what the hell can be wrong?
I have:
pawn Код:
stock SaveStats(playerid)
{
new pname[24];
GetPlayerName(playerid,pname,24);
format(SQL_Query,sizeof(SQL_Query),"UPDATE `Accounts` SET `Money` = '%i', `Level` = '%i', `AdminLevel` = '%i', `Faction` = '%i', `FactionRank` = '%i', `RegistrationStep` = '%i', `BirthDay` = '%i', `BirthMonth` = '%i', `BirthYear` = '%i', `SpawnPoint` = '%i', `TutorialComplete` = '%i' WHERE `Username` = '%s'",
Player[playerid][Money],
Player[playerid][Level],
Player[playerid][AdminLevel],
Player[playerid][Faction],
Player[playerid][FactionRank],
Player[playerid][RegistrationStep],
Player[playerid][BirthDay],
Player[playerid][BirthMonth],
Player[playerid][BirthYear],
Player[playerid][SpawnPoint],
Player[playerid][TutorialComplete],
pname);
mysql_query(SQL_Query);
mysql_free_result();
return 1;
}