23.05.2012, 02:06
yeah weird
try it like this just to make sure your query works
could also add a
printf(); to the pName functions and see what it is actually returning.
try it like this just to make sure your query works
pawn Код:
stock SaveStats(playerid)
{
new pname[24];
GetPlayerName(playerid,pname,24);
format(SQL_Query,sizeof(SQL_Query),"UPDATE `Accounts` SET `Money` = '%d', `Level` = '%d', `AdminLevel` = '%d', `Faction` = '%d', `FactionRank` = '%d', `RegistrationStep` = '%d', `BirthDay` = '%d', `BirthMonth` = '%d', `BirthYear` = '%d', `SpawnPoint` = '%d', `TutorialComplete` = '%d' 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],
pname);
mysql_query(SQL_Query);
mysql_free_result();
return 1;
}
printf(); to the pName functions and see what it is actually returning.
pawn Код:
pName(playerid)
{
new pname[24];
GetPlayerName(playerid,pname,24);
printf("pName = %s",pname);
return pname;
}