MySQL error 2014.
#8

pawn Код:
public SavePlayerStats(playerid)
{
    new Float:hp;
    new EscapeName[MAX_PLAYER_NAME];
    new Float:am;
    new Float:saveX[MAX_PLAYERS], Float:saveY[MAX_PLAYERS], Float:saveZ[MAX_PLAYERS];
    GetPlayerName(playerid, pname, sizeof (pname));
    GetPlayerIp(playerid, ip, 16);
    GetPlayerHealth(playerid,hp);
    GetPlayerArmour(playerid,am);
    GetPlayerPos(playerid, saveX[playerid], saveY[playerid], saveZ[playerid]);
    pInfo[playerid][money] = GetPlayerMoneyEx(playerid);
    SaveWeaponsToFile(playerid);
    mysql_real_escape_string(pname, EscapeName);
    format(file, sizeof file,"UPDATE `users` SET `adminlevel` = '%d', `money` = '%d', `license` = '%d', `weaponlicense` = '%d', `flylicense` = '%d', `job` = '%d' WHERE `username` = '%s'",pInfo[playerid][adminlevel],pInfo[playerid][money],pInfo[playerid][license],pInfo[playerid][weaponlic],pInfo[playerid][flylic],gTeam[playerid],EscapeName);
    mysql_query(file);
    format(file, sizeof file,"UPDATE `users` SET `faction` = '%d', `rank` = '%d', `skin` = '%d', `health` = '%f', `armour` = '%f', `bankmoney` = '%d', `fightstyle` = '%d', `chainlock` = '%d', `cigarets` = '%d' WHERE `username` = '%s'",pInfo[playerid][faction],pInfo[playerid][rank],pInfo[playerid][skin],floatround(hp),floatround(am),pInfo[playerid][bankmoney],pInfo[playerid][fightstyle],pInfo[playerid][chainlock],pInfo[playerid][cigarets],EscapeName);
    mysql_query(file);
    format(file, sizeof file,"UPDATE `users` SET `beer` = '%d', `sprunk` = '%d', `weed` = '%d', `seeds` = '%d', `prepaid` = '%d', `jerrycan` = '%d', `cellphone` = '%d', `phonenum` = '%d', `dlock` = '%d' WHERE `username` = '%s'",pInfo[playerid][beer],pInfo[playerid][sprunk],pInfo[playerid][weed],pInfo[playerid][seeds],pInfo[playerid][prepaid],pInfo[playerid][jerrycan],pInfo[playerid][havephone],pInfo[playerid][phonenum],pInfo[playerid][dlock],EscapeName);
    mysql_query(file);
    format(file, sizeof file,"UPDATE `users` SET `cellphone` = '%d', `weed` = '%d', `seeds` = '%d', `jerrycan` = '%d', `prepaid` = '%d', `dlock` = '%d' WHERE `username` = '%s'",pInfo[playerid][havephone],pInfo[playerid][weed],pInfo[playerid][seeds],pInfo[playerid][jerrycan],pInfo[playerid][prepaid],pInfo[playerid][dlock],EscapeName);
    mysql_query(file);
    format(file, sizeof file,"UPDATE `users` SET `gps` = '%d', `warns` = '%d', `vip` = '%d', `kills` = '%d', `deaths` = '%d', `spawnX` = '%f', `spawnY` = '%f', `spawnZ` = '%f' WHERE `username` = '%s'",pInfo[playerid][GPS],pInfo[playerid][warns],pInfo[playerid][VIP],pInfo[playerid][kills],pInfo[playerid][deaths],saveX[playerid],saveY[playerid],saveZ[playerid],EscapeName);
    mysql_query(file);
    format(file, sizeof file,"UPDATE `users` SET `jailedtime` = '%d', `ajailedtime` = '%d' WHERE `username` = '%s'",JailEndTime[playerid]-GetTickCount(),JailEndTime[playerid]-GetTickCount(),EscapeName);
    mysql_query(file);
}
Reply


Messages In This Thread
MySQL error 2014. - by Danny - 26.04.2011, 17:29
Re: MySQL error 2014. - by Raimis_R - 26.04.2011, 17:39
Re: MySQL error 2014. - by Danny - 26.04.2011, 17:45
Re: MySQL error 2014. - by Raimis_R - 26.04.2011, 17:49
Re: MySQL error 2014. - by Danny - 26.04.2011, 18:02
Re: MySQL error 2014. - by Raimis_R - 26.04.2011, 18:08
Re: MySQL error 2014. - by Danny - 26.04.2011, 18:24
Re: MySQL error 2014. - by Raimis_R - 26.04.2011, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)