25.07.2010, 08:59
this is the error
the error spamming my server log.
this is my onplayerupdate:
Thanks thanks thanks for who are helping
Код:
[11:58:03] Error in mysql_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 'Int=0,VirWorld=0,Local=255,Team=3 WHERE id=25' at line 1
this is my onplayerupdate:
Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerNPC(playerid)){return 1;}
if(gPlayerLogged[playerid])
{
MySQLCheckConnection();
new query[MAX_STRING];
format(query, MAX_STRING, "UPDATE players SET ");
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pKey]);
PlayerInfo[playerid][pCash] = GetCash(playerid);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Level", PlayerInfo[playerid][pLevel]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Admin", PlayerInfo[playerid][pAdmin]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DonateRank", PlayerInfo[playerid][pDonateRank]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Registered", PlayerInfo[playerid][pReg]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Sex", PlayerInfo[playerid][pSex]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Age", PlayerInfo[playerid][pAge]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CK", PlayerInfo[playerid][pCK]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Cash", PlayerInfo[playerid][pCash]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Bank", PlayerInfo[playerid][pAccount]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Crimes", PlayerInfo[playerid][pCrimes]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Mute", PlayerInfo[playerid][pMuted]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Warn", PlayerInfo[playerid][pWarns]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Skin", PlayerInfo[playerid][pChar]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Int", PlayerInfo[playerid][pInt]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "VirWorld", PlayerInfo[playerid][pVirWorld]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Local", PlayerInfo[playerid][pLocal]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Team", PlayerInfo[playerid][pTeam]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Model", PlayerInfo[playerid][pModel]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Arrested", PlayerInfo[playerid][pArrested]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "WantedDeaths", PlayerInfo[playerid][pWantedDeaths]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Phonebook", PlayerInfo[playerid][pPhoneBook]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "WalkiTalki",PlayerInfo[playerid][pWT]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "GPS",PlayerInfo[playerid][pGPS]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Cards",PlayerInfo[playerid][pCards]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Flop1",PlayerInfo[playerid][pFlop1]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Flop2",PlayerInfo[playerid][pFlop2]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Flop3",PlayerInfo[playerid][pFlop3]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "River",PlayerInfo[playerid][pRiver]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Turn",PlayerInfo[playerid][pTurn]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Dealer",PlayerInfo[playerid][pDealer]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "LottoNr", PlayerInfo[playerid][pLottoNr]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Fishes", PlayerInfo[playerid][pFishes]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "SHealth", PlayerInfo[playerid][pSHealth]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "Health", PlayerInfo[playerid][pHealth]);
GetPlayerArmourAC(playerid,PlayerInfo[playerid][pArmour]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "Armour",PlayerInfo[playerid][pArmour]);
if ((PlayerInfo[playerid][pPosX]==0.0 && PlayerInfo[playerid][pPosY]==0.0 && PlayerInfo[playerid][pPosZ]==0.0))
{
PlayerInfo[playerid][pPosX] = 1684.9;
PlayerInfo[playerid][pPosY] = -2244.5;
PlayerInfo[playerid][pPosZ] = 13.5;
}
if(Spectate[playerid] != 255)
{
PlayerInfo[playerid][pPosX] = Unspec[playerid][sPx];
PlayerInfo[playerid][pPosY] = Unspec[playerid][sPy];
PlayerInfo[playerid][pPosZ] = Unspec[playerid][sPz];
PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
}
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "PosX", PlayerInfo[playerid][pPosX]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "PosY", PlayerInfo[playerid][pPosY]);
MySQLUpdatePlayerFlo(query, PlayerInfo[playerid][pSQLID], "PosZ", PlayerInfo[playerid][pPosZ]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Crashed", PlayerInfo[playerid][pCrashed]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PhNumber", PlayerInfo[playerid][pPnumber]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PlayHours", PlayerInfo[playerid][pConnectTime]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Exp", PlayerInfo[playerid][pExp]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "HouseKey", PlayerInfo[playerid][pPhousekey]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "BizzKey", PlayerInfo[playerid][pPbiskey]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarKey", PlayerInfo[playerid][pPcarkey]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarKey2",PlayerInfo[playerid][pPcarkey2]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarKey3",PlayerInfo[playerid][pPcarkey3]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Job", PlayerInfo[playerid][pJob]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Faction", PlayerInfo[playerid][pFaction]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Paycheck", PlayerInfo[playerid][pPayCheck]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "HeadValue", PlayerInfo[playerid][pHeadValue]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Jailed", PlayerInfo[playerid][pJailed]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "JailTime", PlayerInfo[playerid][pJailTime]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Materials", PlayerInfo[playerid][pMats]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Drugs", PlayerInfo[playerid][pDrugs]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Weed",PlayerInfo[playerid][pWeed]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Lsd",PlayerInfo[playerid][pLsd]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Heroin",PlayerInfo[playerid][pHeroin]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Cocaine",PlayerInfo[playerid][pCocaine]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Morphine",PlayerInfo[playerid][pMorphine]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Leader", PlayerInfo[playerid][pLeader]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Member", PlayerInfo[playerid][pMember]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FMember", PlayerInfo[playerid][pFMember]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FRank", PlayerInfo[playerid][pRank]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PayDay", PlayerInfo[playerid][pPayDay]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PayDayHad", PlayerInfo[playerid][pPayDayHad]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PayDayPU",PlayerInfo[playerid][pPayDayPU]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Deaths", PlayerInfo[playerid][pDeaths]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun1", PlayerInfo[playerid][pGun1]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun2", PlayerInfo[playerid][pGun2]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun3", PlayerInfo[playerid][pGun3]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Gun4", PlayerInfo[playerid][pGun4]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo1", PlayerInfo[playerid][pAmmo1]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo2", PlayerInfo[playerid][pAmmo2]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo3", PlayerInfo[playerid][pAmmo3]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Ammo4", PlayerInfo[playerid][pAmmo4]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarTime", PlayerInfo[playerid][pCarTime]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Watch", PlayerInfo[playerid][pWatch]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Wins", PlayerInfo[playerid][pWins]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Loses", PlayerInfo[playerid][pLoses]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Tutorial", PlayerInfo[playerid][pTut]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Teory",PlayerInfo[playerid][pTeory]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DrivingLic", PlayerInfo[playerid][pCarLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FlyingLic", PlayerInfo[playerid][pFlyLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "BoatLic", PlayerInfo[playerid][pBoatLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FishLic", PlayerInfo[playerid][pFishLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "WeaponLic", PlayerInfo[playerid][pGunLic]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Contract", PlayerInfo[playerid][pContractTime]);
if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Fuel", PlayerInfo[playerid][pFuel]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Married", PlayerInfo[playerid][pMarried]);
MySQLUpdatePlayerStr(query, PlayerInfo[playerid][pSQLID], "MarriedTo", PlayerInfo[playerid][pMarriedTo]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FishTool",PlayerInfo[playerid][pFishTool]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "InvWeapon",PlayerInfo[playerid][pInvWeapon]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "InvAmmo",PlayerInfo[playerid][pInvAmmo]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "InvDrugs",PlayerInfo[playerid][pInvDrugs]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "InvDrugsName",PlayerInfo[playerid][pInvDrugsName]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Lighter",PlayerInfo[playerid][pLighter]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Cigarettes",PlayerInfo[playerid][pCigarettes]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Lang1",PlayerInfo[playerid][pLang1]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Lang2",PlayerInfo[playerid][pLang2]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "HaveLock",PlayerInfo[playerid][pLockH]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "HaveAlarm",PlayerInfo[playerid][pAlarmH]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "EngineLevel",PlayerInfo[playerid][pImo]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DiseaseLevel",PlayerInfo[playerid][pDiseaseRank]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Disease",PlayerInfo[playerid][pDisease]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "AcceptDeath",PlayerInfo[playerid][pDie]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FishCount",PlayerInfo[playerid][pFishCount]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Bag",PlayerInfo[playerid][pBag]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "LegalFaction",PlayerInfo[playerid][pLegalF]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Duty",PlayerInfo[playerid][pDuty]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CrashSkin",PlayerInfo[playerid][pModelx]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "ResponseAdmins",PlayerInfo[playerid][pHAdmin]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "AdminWarns",PlayerInfo[playerid][pAdminWarns]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "LicensePoints",PlayerInfo[playerid][pLicensePoints]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FightStyle", PlayerInfo[playerid][pFighting]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DetSkill", PlayerInfo[playerid][pDetSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "SexSkill", PlayerInfo[playerid][pSexSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "BoxSkill", PlayerInfo[playerid][pBoxSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "LawSkill", PlayerInfo[playerid][pLawSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "MechSkill", PlayerInfo[playerid][pMechSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "JackSkill", PlayerInfo[playerid][pJackSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CarSkill", PlayerInfo[playerid][pCarSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "NewsSkill", PlayerInfo[playerid][pNewsSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DrugsSkill", PlayerInfo[playerid][pDrugsSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "CookSkill", PlayerInfo[playerid][pCookSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "FishSkill", PlayerInfo[playerid][pFishSkill]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "DrugPerk", PlayerInfo[playerid][pDrugPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "MiserPerk", PlayerInfo[playerid][pMiserPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "PainPerk", PlayerInfo[playerid][pPainPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "TraderPerk", PlayerInfo[playerid][pTraderPerk]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "InGame",PlayerInfo[playerid][pInGame]);
MySQLUpdatePlayerInt(query, PlayerInfo[playerid][pSQLID], "Locked", PlayerInfo[playerid][pLocked]);
MySQLUpdateFinish(query, PlayerInfo[playerid][pSQLID]);
}
}
return 1;
}


