Hallo Leute,
ich habe nun das Accountsystem auf Mysql umgeschrieben. Jedoch klappt nicht alles so wie geplannt.
Gebe ich beim Joinen mein Passwort ein und klick auf Login steht da: Server Closed the Connection.
Ich hab die Datenbank überprüft und auch die Verbindung zu ihr wird aufgestellt.
Im Mysql Debug steht folgendes:
Zitat[21:40:31] >> mysql_query( Connection handle: 1 )
[21:40:31] CMySQLHandler::Query(`Gesperrt`='0',`Contract`='0',`Notruf`='0',`Navi`='0',`Skin`='0',`Sprengstoff`='0',`Hotel`='0',`TutorialLevel`='0',`Wohnung`='0',`JobGehalt`='0',`BusSkill`='0' WHERE `Name`='Random_Name) - An error has occured. (Error ID: 1064, 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 '`Gesperrt`='0',`Contract`='0',`Notruf`='0',`Navi`='0',`Skin`='0',`Sprengstoff`='' at line 1)
[21:40:31] OnQueryError() - Called.
Ich weiß jedoch jetzt nicht weiter weil ich nichts erkennen kann oder habe ich was übersehen?
stock SavePlayer(playerid)
{
if(!IsPlayerConnected(playerid) || IsPlayerNPC(playerid))return 0;
new query[1024], sname[MAX_PLAYER_NAME];
GetPlayerName(playerid,sname,sizeof(sname));
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid), PlayerInfo[playerid][pLevel] = GetPlayerScore(playerid);
format(query,sizeof query,"UPDATE `spieler` SET `Level`='%d', `Admin`='%d', `DonateRank`='%d', `Reg`='%d', `Sex`='%d', `Age`='%d', `Origin`='%d', `CK`='%d', `Muted`='%d', `Exp`='%d' , `Cash`='%d', `Account`='%d', `Crimes`='%d'",
PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pDonateRank],PlayerInfo[playerid][pReg],PlayerInfo[playerid][pSex],PlayerInfo[playerid][pAge],PlayerInfo[playerid][pOrigin],PlayerInfo[playerid][pCK],PlayerInfo[playerid][pMuted],PlayerInfo[playerid][pExp],PlayerInfo[playerid][pCash],PlayerInfo[playerid][pAccount],PlayerInfo[playerid][pCrimes]);
format(query,sizeof query,"`Arrested`='%d', `WantedDeaths`='%d', `PhoneBook`='%d', `LottoNr`='%d', `Job`='%d', `PayCheck`='%d'",
PlayerInfo[playerid][pArrested],PlayerInfo[playerid][pWantedDeaths],PlayerInfo[playerid][pPhoneBook],PlayerInfo[playerid][pLottoNr],PlayerInfo[playerid][pJob],PlayerInfo[playerid][pPayCheck]);
format(query,sizeof query,"`HeadValue`='%d',`Jailed`='%d',`JailTime`='%d',`GangJailed`='%d',`Mauled`='%d',`Mats`='%d',`Drugs`='%d',`Leader`='%d',`Member`='%d',`FMember`='%d',`Rank`='%d',`Health`='%.2f',`SHealth`='%.2f'",
PlayerInfo[playerid][pHeadValue],PlayerInfo[playerid][pJailed],PlayerInfo[playerid][pJailTime],PlayerInfo[playerid][pGangJailed],PlayerInfo[playerid][pMauled],PlayerInfo[playerid][pMats],PlayerInfo[playerid][pDrugs],PlayerInfo[playerid][pLeader],PlayerInfo[playerid][pMember],PlayerInfo[playerid][pFMember],PlayerInfo[playerid][pRank],PlayerInfo[playerid][pHealth],PlayerInfo[playerid][pSHealth]);
format(query,sizeof query,"`Int`='%d',`Local`='%d',`Team`='%d',`Model`='%d',`Pnumber`='%d'",
PlayerInfo[playerid][pInt],PlayerInfo[playerid][pLocal],PlayerInfo[playerid][pTeam],PlayerInfo[playerid][pModel],PlayerInfo[playerid][pPnumber]),
format(query,sizeof query,"`Phousekey`='%d',`Pbiskey`='%d',`CarLic`='%d',`NewLic`='%d',`FlyLic`='%d',`Pos_x`='%.4f',`Pos_y`='%.4f',`Pos_z`='%.4f',`BoatLic`='%d',`FishLic`='%d',`GunLic`='%d',`LKWLic`='%d',`RollerLic`='%d',`MotoLic`='%d',`Zig`='%d',`ZigSucht`='%d'",
PlayerInfo[playerid][pPhousekey],PlayerInfo[playerid][pPbiskey],PlayerInfo[playerid][pCarLic],PlayerInfo[playerid][pNewLic],PlayerInfo[playerid][pFlyLic],PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z],PlayerInfo[playerid][pBoatLic],PlayerInfo[playerid][pFishLic],PlayerInfo[playerid][pGunLic],PlayerInfo[playerid][pLKWLic],PlayerInfo[playerid][pRollerLic],PlayerInfo[playerid][pMotoLic],PlayerInfo[playerid][pZig],PlayerInfo[playerid][pZigSucht]);
format(query,sizeof query,"`Mulltime`='%d',`PayDay`='%d',`PayDayHad`='%d',`AlcoholPerk`='%d',`Warns`='%d',`Adjustable`='%d',`Fuel`='%d',`Married`='%d',`MarriedTo`='%s',`InvDrugs`='%d'",
PlayerInfo[playerid][pMulltime],PlayerInfo[playerid][pPayDay],PlayerInfo[playerid][pPayDayHad],PlayerInfo[playerid][pAlcoholPerk],PlayerInfo[playerid][pWarns],PlayerInfo[playerid][pAdjustable],PlayerInfo[playerid][pFuel],PlayerInfo[playerid][pMarried],PlayerInfo[playerid][pMarriedTo],PlayerInfo[playerid][pInvDrugs]);
format(query,sizeof query,"`InvMats`='%d',`Roadblock`='%d',`PlayMinutes`='%d',`GesamtMinutes`='%d',`MinutesSinceLogin`='%d',`MinutesSinceAn`='%d'",
PlayerInfo[playerid][pInvMats],PlayerInfo[playerid][pRoadblock],PlayerInfo[playerid][pPlayMinutes],PlayerInfo[playerid][pGesamtMinutes],PlayerInfo[playerid][pMinutesSinceLogin],PlayerInfo[playerid][pMinutesSinceAn]);
format(query,sizeof query,"`HandyGeld`='%d',`HandyVer`='%d',`UhrID`='%d',`HandyID`='%d',`OwnPerso`='%d',`OwnAntrag`='%d',`PersoStop`='%d',`Gehalt`='%d',`FrakSperre`='%d',`BoxMats`='%d',`BoxDrugs`='%d',`Tot`='%d',`Meldung`='%d',`Ptankekey`='%d'",
PlayerInfo[playerid][pHandyGeld],PlayerInfo[playerid][pHandyVer],PlayerInfo[playerid][pUhrID],PlayerInfo[playerid][pHandyID],PlayerInfo[playerid][pOwnPerso],PlayerInfo[playerid][pOwnAntrag],PlayerInfo[playerid][pPersoStop],PlayerInfo[playerid][pGehalt],PlayerInfo[playerid][pFrakSperre],PlayerInfo[playerid][pBoxMats],PlayerInfo[playerid][pBoxDrugs],PlayerInfo[playerid][pTot],PlayerInfo[playerid][pMeldung],PlayerInfo[playerid][pPtankekey]);
format(query,sizeof query,"`Gesperrt`='%d',`Contract`='%d',`Notruf`='%d',`Navi`='%d',`Skin`='%d',`Sprengstoff`='%d',`Hotel`='%d',`TutorialLevel`='%d',`Wohnung`='%d',`JobGehalt`='%d',`BusSkill`='%d' WHERE `Name`='%s'",
PlayerInfo[playerid][pGesperrt],PlayerInfo[playerid][pContract],PlayerInfo[playerid][pNotruf],PlayerInfo[playerid][pNavi],PlayerInfo[playerid][pSkin],PlayerInfo[playerid][pSprengstoff],PlayerInfo[playerid][pHotel],PlayerInfo[playerid][pTutorialLevel],PlayerInfo[playerid][pWohnung],PlayerInfo[playerid][pJobGehalt],PlayerInfo[playerid][pBusSkill],sname);
printf("Die Speicherung für %s wurde aufgerufen!",sname),print(query);
mysql_query(query);
strdel(query,0,sizeof(query));
return 1;
}
Ich hoffe mir kann jemand weiter helfen.
MfG