I have worked with MySQL before but the problem is this code, I have used in a previous script before. Its been giving me these errors and when I remove it but keep the stock part in it compiles. Here are the errors:
pawn Код:
SavePlayer(playerid)
{
new Query[600];
GetPlayerPos(playerid, PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosY], PlayerInfo[playerid][PosZ]);
GetPlayerName(playerid, PlayerInfo[playerid][Nick], 24);
format(Query, sizeof(Query), "UPDATE `playerdata` SET `cash` = '%d', `admin` = '%d', `kills` = '%d', `deaths` = '%d', `sex` = '%d', `age` = '%d', `skin` = '%d', `posx` = '%d', `posy` = '%d', `posz` = '%d', `angle` = '%d', `interior` = '%d', `virtualworld` = '%d', `faction` = '%d', `rank` = '%d', `division` = '%d', `leader` = '%d', `job` = '%d', `facmod` = '%d', `wanted` = '%d', `jailed` = '%d', `jailtime` = '%d', `housekey` = '%d', `number` = '%d', `cell` = '%d', `level` = '%d' WHERE `nick` = '%s' LIMIT 1",
GetPlayerMoney(playerid),
PlayerInfo[playerid][pAdmin],
PlayerInfo[playerid][pKills],
PlayerInfo[playerid][pDeaths],
PlayerInfo[playerid][pSex],
PlayerInfo[playerid][pAge],
GetPlayerSkin(playerid),
PlayerInfo[playerid][PosX],
PlayerInfo[playerid][PosY],
PlayerInfo[playerid][PosZ],
PlayerInfo[playerid][Angle],
PlayerInfo[playerid][Interior],
PlayerInfo[playerid][VirtualWorld],
PlayerInfo[playerid][pFaction],
PlayerInfo[playerid][pRank],
PlayerInfo[playerid][pDivision],
PlayerInfo[playerid][pLeader],
PlayerInfo[playerid][pJob],
PlayerInfo[playerid][pFacMod],
PlayerInfo[playerid][pWanted],
PlayerInfo[playerid][pJailed],
PlayerInfo[playerid][pJailTime],
PlayerInfo[playerid][pHouseKey],
PlayerInfo[playerid][pNumber],
PlayerInfo[playerid][pCell],
PlayerInfo[playerid][pLevel],
PlayerInfo[playerid][Nick]);
mysql_query(Query);
format(Query, sizeof(Query), "UPDATE `playerdata` SET `exp` = '%d', `warnings` = '%d', `license` = '%d', `cdl` = '%d', `weplic` = '%d', `weed` = '%d', `crack` = '%d', `materials` = '%d', `weapon1` = '%d', `weapon1a` = '%d', `weapon2` = '%d', `weapon2a` = '%d', `weapon3` = '%d', `weapon3a` = '%d', `weapon4` = '%d', `weapon4a` = '%d', `weapon5` = '%d', `weapon5a` = '%d', `weapon6` = '%d', `weapon6a` = '%d', `weapon7` = '%d', `weapon7a` = '%d', `weapon8` = '%d', `weapon8a` = '%d' WHERE `nick` = '%s' LIMIT 1",
PlayerInfo[playerid][pExp],
PlayerInfo[playerid][pWarnings],
PlayerInfo[playerid][pLicense],
PlayerInfo[playerid][pCDL],
PlayerInfo[playerid][pWepLic],
PlayerInfo[playerid][pWeed],
PlayerInfo[playerid][pCrack],
PlayerInfo[playerid][pMaterials],
PlayerInfo[playerid][Weapon1],
PlayerInfo[playerid][Weapon1a],
PlayerInfo[playerid][Weapon2],
PlayerInfo[playerid][Weapon2a],
PlayerInfo[playerid][Weapon3],
PlayerInfo[playerid][Weapon3a],
PlayerInfo[playerid][Weapon4],
PlayerInfo[playerid][Weapon4a],
PlayerInfo[playerid][Weapon5],
PlayerInfo[playerid][Weapon5a],
PlayerInfo[playerid][Weapon6],
PlayerInfo[playerid][Weapon6a],
PlayerInfo[playerid][Weapon7],
PlayerInfo[playerid][Weapon7a],
PlayerInfo[playerid][Weapon8],
PlayerInfo[playerid][Weapon8a],
PlayerInfo[playerid][Nick]);
mysql_query(Query);
format(Query, sizeof(Query), "UPDATE `playerdata` SET `weapon9` = '%d', `weapon9a` = '%d', `weapon10` = '%d', `weapon10a` = '%d', `weapon11` = '%d', `weapon11a` = '%d', `weapon12` = '%d', `weapon12a` = '%d', `adminname` = '%d', `playername` = '%d', `accent` = '%d', `houseowner` = '%d', `ip` = '%d' WHERE `nick` = '%s' LIMIT 1",
PlayerInfo[playerid][Weapon9],
PlayerInfo[playerid][Weapon9a],
PlayerInfo[playerid][Weapon10],
PlayerInfo[playerid][Weapon10a],
PlayerInfo[playerid][Weapon11],
PlayerInfo[playerid][Weapon11a],
PlayerInfo[playerid][Weapon12],
PlayerInfo[playerid][Weapon12a],
PlayerInfo[playerid][adminname],
PlayerInfo[playerid][playername],
PlayerInfo[playerid][accent],
PlayerInfo[playerid][houseowner],
PlayerInfo[playerid][ip],
PlayerInfo[playerid][Nick]);
mysql_query(Query);
return 1;
}
I hope someone can find the problem as sometimes when I proofread the codes I will miss at least two or three so just getting you guys to proofread it incase I may have missed something.
You need to split the first one up into 2, use the same format as the others.