12.05.2012, 11:12
(
Последний раз редактировалось printer; 12.05.2012 в 13:22.
)
pawn Код:
stock SavePlayer(playerid)
{
new
query[1264]
;
format(query,sizeof(query),"UPDATE `users` SET `job` = '%i', `jobh` = '%i', `jobrank` = '%i', `paycheck` = '%i', `primwea` = '%i'",
PlayerInfo[playerid][pJob],PlayerInfo[playerid][pJobH],PlayerInfo[playerid][pJobRank],PlayerInfo[playerid][pPayCheck],PlayerInfo[playerid][pPrimWeap]);
print("Debug");
format(query,sizeof(query),"%s, `primweapammo` = '%i', `secweap` = '%i', `secweapammo` = '%i', `melee` = '%i', `mask` = '%i', `hours` = '%i'",
query,PlayerInfo[playerid][pPrimWeapA],PlayerInfo[playerid][pSecWeap],PlayerInfo[playerid][pSecWeapA],PlayerInfo[playerid][pMelee],PlayerInfo[playerid][pMask],PlayerInfo[playerid][pHours]);
print("Debug");
format(query,sizeof(query),"%s, `exp` = '%i', `level` = '%i', `phone` = '%i', `skin` = '%i', `donatorlvl` = '%i', `weplic` = '%i', `flylic` = '%i', `drivelic` = '%i'",
query,PlayerInfo[playerid][pExp], PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pPhone],PlayerInfo[playerid][pSkin],PlayerInfo[playerid][pDonlvl], PlayerInfo[playerid][pWeplic] ? 1:0,PlayerInfo[playerid][pFlylic] ? 1:0, PlayerInfo[playerid][pDrivelic] ? 1:0);
print("Debug");
format(query,sizeof(query),"%s, `faction` = '%i', `rank` = '%i', `jailed` = '%i', `jtime` = '%i'",
query,PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pRank], PlayerInfo[playerid][pJailed],PlayerInfo[playerid][pJTime]);
print("Debug");
format(query,sizeof(query),"%s, `cash` = '%i', `savings` = '%i', `bizkey` = '%i', `alevel` = '%i', `hkey` = '%i,%i,%i', `spawn` = '%.1f,%.1f,%.1f', `accepted` = '1', `mseeds` = '%i', `boxx` = '%i', `boxy` = '%i', `boxz` = '%i'",
query, ACData[playerid][Money], PlayerInfo[playerid][pSavings], PlayerInfo[playerid][pBizKey], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pHKey][0],PlayerInfo[playerid][pHKey][1],PlayerInfo[playerid][pHKey][2], PlayerInfo[playerid][pSpawn][0],PlayerInfo[playerid][pSpawn][1],PlayerInfo[playerid][pSpawn][2],PlayerInfo[playerid][pMSeeds],PlayerInfo[playerid][pBoxX],PlayerInfo[playerid][pBoxY],PlayerInfo[playerid][pBoxZ]);
print("Debug");
format(query,sizeof(query),"%s, `tester` = '%i', `vkeys` = '%i,%i,%i,%i,%i,%i,%i,%i,%i,%i', `psentences` = '%i', `jsentences` = '%i', `bwounded` = '%i', `crash` = '%.1f,%.1f,%.1f', `bank` = '%i'",query,PlayerInfo[playerid][pTester],
PlayerInfo[playerid][pVKey][0],PlayerInfo[playerid][pVKey][1],PlayerInfo[playerid][pVKey][2],PlayerInfo[playerid][pVKey][3],PlayerInfo[playerid][pVKey][4],PlayerInfo[playerid][pVKey][5],
PlayerInfo[playerid][pVKey][6],PlayerInfo[playerid][pVKey][7],PlayerInfo[playerid][pVKey][8],PlayerInfo[playerid][pVKey][9],PlayerInfo[playerid][pPSen],PlayerInfo[playerid][pJSen],PlayerInfo[playerid][pWounded],PlayerInfo[playerid][pCrash][0],PlayerInfo[playerid][pCrash][1],PlayerInfo[playerid][pCrash][2],
PlayerInfo[playerid][pBank]);
print("Debug");
format(query,sizeof(query),"%s, `balance` = '%i', `savings` = '%i', `fpoints` = '%i', `dpoints` = '%i', `spawnedveh` = '%i', `rent` = '%i', `defacc` = '%i', `radio` = '%i', `rfreq` = '%i,%i,%i'",
query,PlayerInfo[playerid][pBalance],PlayerInfo[playerid][pSavings],PlayerInfo[playerid][pFPoints],PlayerInfo[playerid][pDPoints],PlayerInfo[playerid][SpawnedVehicle],PlayerInfo[playerid][pRentPrice],PlayerInfo[playerid][pDefAcc],PlayerInfo[playerid][pRadio],PlayerInfo[playerid][pRadioF][0],PlayerInfo[playerid][pRadioF][1],PlayerInfo[playerid][pRadioF][2]);
print("Debug");
format(query,sizeof(query),"%s, `weappacks` = '%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i', `weappacka` = '%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i', `dpack` = '%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i', `dpacka` = '%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i', `dpacks` = '%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i,%i'", query,
PlayerInfo[playerid][pWPack][0],PlayerInfo[playerid][pWPack][1],PlayerInfo[playerid][pWPack][2],PlayerInfo[playerid][pWPack][3],PlayerInfo[playerid][pWPack][4],PlayerInfo[playerid][pWPack][5],PlayerInfo[playerid][pWPack][6],PlayerInfo[playerid][pWPack][7],PlayerInfo[playerid][pWPack][8],PlayerInfo[playerid][pWPack][9],PlayerInfo[playerid][pWPack][10],PlayerInfo[playerid][pWPack][11],
PlayerInfo[playerid][pWPackA][0],PlayerInfo[playerid][pWPackA][1],PlayerInfo[playerid][pWPackA][2],PlayerInfo[playerid][pWPackA][3],PlayerInfo[playerid][pWPackA][4],PlayerInfo[playerid][pWPackA][5],PlayerInfo[playerid][pWPackA][6],PlayerInfo[playerid][pWPackA][7],PlayerInfo[playerid][pWPackA][8],PlayerInfo[playerid][pWPackA][9],PlayerInfo[playerid][pWPackA][10],PlayerInfo[playerid][pWPackA][11],
PlayerInfo[playerid][pDPack][0],PlayerInfo[playerid][pDPack][1],PlayerInfo[playerid][pDPack][2],PlayerInfo[playerid][pDPack][3],PlayerInfo[playerid][pDPack][4],PlayerInfo[playerid][pDPack][5],PlayerInfo[playerid][pDPack][6],PlayerInfo[playerid][pDPack][7],PlayerInfo[playerid][pDPack][8],PlayerInfo[playerid][pDPack][9],PlayerInfo[playerid][pDPack][10],PlayerInfo[playerid][pDPack][11],
PlayerInfo[playerid][pDPack][12],PlayerInfo[playerid][pDPack][13],PlayerInfo[playerid][pDPack][14],PlayerInfo[playerid][pDPack][15],PlayerInfo[playerid][pDPack][16],PlayerInfo[playerid][pDPack][17],PlayerInfo[playerid][pDPack][18],PlayerInfo[playerid][pDPack][19], PlayerInfo[playerid][pDPackA][0],PlayerInfo[playerid][pDPackA][1],PlayerInfo[playerid][pDPackA][2],PlayerInfo[playerid][pDPackA][3],
PlayerInfo[playerid][pDPackA][4],PlayerInfo[playerid][pDPackA][5],PlayerInfo[playerid][pDPackA][6],PlayerInfo[playerid][pDPackA][7],PlayerInfo[playerid][pDPackA][8],PlayerInfo[playerid][pDPackA][9],PlayerInfo[playerid][pDPackA][10], PlayerInfo[playerid][pDPackA][11],PlayerInfo[playerid][pDPackA][12],PlayerInfo[playerid][pDPackA][13],PlayerInfo[playerid][pDPackA][14],PlayerInfo[playerid][pDPackA][15],
PlayerInfo[playerid][pDPackA][16],PlayerInfo[playerid][pDPackA][17],PlayerInfo[playerid][pDPackA][18],PlayerInfo[playerid][pDPackA][19],PlayerInfo[playerid][pDPackS][0],PlayerInfo[playerid][pDPackS][1],PlayerInfo[playerid][pDPackS][2],PlayerInfo[playerid][pDPackS][3],PlayerInfo[playerid][pDPackS][4],PlayerInfo[playerid][pDPackS][5],PlayerInfo[playerid][pDPackS][6],PlayerInfo[playerid][pDPackS][7],
PlayerInfo[playerid][pDPackS][8],PlayerInfo[playerid][pDPackS][9],PlayerInfo[playerid][pDPackS][10],PlayerInfo[playerid][pDPackS][11],PlayerInfo[playerid][pDPackS][12],PlayerInfo[playerid][pDPackS][13],PlayerInfo[playerid][pDPackS][14],PlayerInfo[playerid][pDPackS][15],PlayerInfo[playerid][pDPackS][16],PlayerInfo[playerid][pDPackS][17],PlayerInfo[playerid][pDPackS][18],PlayerInfo[playerid][pDPackS][19]);
format(query,sizeof(query),"%s, `hunger` = '%i', `addiction` = '%i', `addictionl` = '%i', `cstyle` = '%i', `pseeds` = '%i', `cseeds` = '%i', `mgseeds` = '%i' WHERE `id` = '%i'",query,PlayerInfo[playerid][pHunger],PlayerInfo[playerid][pAddiction],PlayerInfo[playerid][pAddictionL],PlayerInfo[playerid][pCStyle],PlayerInfo[playerid][pPSeeds],PlayerInfo[playerid][pCSeeds],PlayerInfo[playerid][pMGSeeds],PlayerInfo[playerid][pUID]);
print("Debug");
mysql_query(query);
print("Debug");
return 1;
}
Код:
[14:16:29] [MySQL] Error (0): Failed to exeute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1.