Moin,
Ich habe ein kleinen Fehler aber finde ihn iwie nicht
Code
[14:19:39] [ERROR] error #1064 while executing query "UPDATE Privatcar SET Fx = '1088.839966', Fy = '-306.472992', Fz = '73.708702', Fr = '123.773003', Color1 = '3', Color2 = '4', Kilometer = '466', Spoiler = '0', Hood = '0', Roof = '0', Sideskirt = '0', Lamps = '0', Nitro = '0', Exhaust = '0', Wheels = '0', Stereo = '0', Hydraulics = '0', Frontb = '0', Rearb = '0', Ventr = '0', Ventl = '0',": 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
Code
mysql_format(handle, string, sizeof(string), "UPDATE Privatcar SET Fx = '%f', Fy = '%f', Fz = '%f', Fr = '%f', Color1 = '%d', Color2 = '%d', Kilometer = '%d',", pCar[i][pc_x], pCar[i][pc_y], pCar[i][pc_z], pCar[i][pc_r], pCar[i][pc_color1], pCar[i][pc_color2], pCar[i][pc_kilometer]);
mysql_format(handle, string, sizeof(string), "%s Spoiler = '%d', Hood = '%d', Roof = '%d', Sideskirt = '%d', Lamps = '%d', Nitro = '%d', Exhaust = '%d',", string, pCar[i][pc_Spoiler], pCar[i][pc_Hood], pCar[i][pc_Roof], pCar[i][pc_Sideskirt], pCar[i][pc_Lamps], pCar[i][pc_Nitro], pCar[i][pc_Exhaust]);
mysql_format(handle, string, sizeof(string), "%s Wheels = '%d', Stereo = '%d', Hydraulics = '%d', Frontb = '%d', Rearb = '%d', Ventr = '%d', Ventl = '%d',", string, pCar[i][pc_Wheels], pCar[i][pc_Stereo], pCar[i][pc_Hydraulics], pCar[i][pc_Frontb], pCar[i][pc_Rearb], pCar[i][pc_Ventr], pCar[i][pc_Ventl]);
mysql_format(handle, string, sizeof(string), "%s Tank = '%f', Kraftstoffart = '%d' WHERE ID = '%d'", pCar[i][pc_Tank], pCar[i][pc_Kraftstoffart], pCar[i][pc_dbid]);
mysql_pquery(handle, string);
Und das 2te
Code
stock SaveUserStats(playerid)
{
if(!pInfo[playerid][pLoggedIn]) return 1;
new query[2056];
mysql_format(handle, query, sizeof(query), "UPDATE Accounts SET Skin = '%d', Admin = '%d', Fraktion = '%d', Rang = '%d', Level = '%d', Money = '%d', Perso = '%d',",
pInfo[playerid][pSkin], pInfo[playerid][pAdmin], pInfo[playerid][pFraktion], pInfo[playerid][pRang], pInfo[playerid][pLevel], pInfo[playerid][pMoney], pInfo[playerid][pPerso]);
mysql_format(handle, query, sizeof(query), "%s`Alter` = '%d', Geburtstag = '%s', Geschlecht = '%d', Bank = '%d', Persot = '%d', Kontonr = '%d', Kontopin = '%d', Bankg = '%d', Job = '%d', Jobsperre = '%d', Mullep = '%d', Farmep = '%d', Holzep = '%d', Wanteds = '%d',",
query, pInfo[playerid][pAlter], pInfo[playerid][pGeburtstag], pInfo[playerid][pGeschlecht], pInfo[playerid][pBank], pInfo[playerid][pPersot], pInfo[playerid][pKontonr], pInfo[playerid][pKontopin], pInfo[playerid][pBankg], pInfo[playerid][pJob], pInfo[playerid][pJobsperre], pInfo[playerid][pMullep], pInfo[playerid][pFarmep], pInfo[playerid][pHolzep], pInfo[playerid][pWanteds]);
mysql_format(handle, query, sizeof(query), "`Hotelid` = '%d', `Hotelzimmer` = '%d' WHERE ID = '%d'",
query, pInfo[playerid][pHotel], pInfo[playerid][pHotelzimmer], pInfo[playerid][p_id]);
mysql_pquery(handle, query);
return 1;
}
Alles anzeigen
Code
[14:19:39] [ERROR] error #1064 while executing query "`Hotelid` = '85', `Hotelzimmer` = '2' WHERE ID = '1'": 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 '`Hotelid` = '85', `Hotelzimmer` = '2' WHERE ID = '1'' at line 1