Hallo,
Ich kümmere mich derzeit darum das die Speicherung der Fahrzeuge reibungslos Funktionieren aber scheinbar funktioniert das noch nicht so ganz.
[15:15:57] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''0' at line 1
Ich Verstehe nicht warum er da rum mecker?
Code
for(new vehSlot=0;vehSlot<MAX_PLAYER_VEHICLES;vehSlot++)
{
if(!strcmp(GetName(playerid), PrivateVehicle[playerid][vehSlot][vehBesitzer], true))
{
if(PrivateVehicle[playerid][vehSlot][modelid] != 0)
{
format(secondQuery, sizeof(secondQuery), "UPDATE `server_vehicles` SET `modelid`='%d', `vehPosX`='%f', `vehPosY`='%f', `vehPosZ`='%f', `vehPosA`='%f', `vehHealth`='%f', ",
PrivateVehicle[playerid][vehSlot][modelid], PrivateVehicle[playerid][vehSlot][vehPosX], PrivateVehicle[playerid][vehSlot][vehPosY], PrivateVehicle[playerid][vehSlot][vehPosZ], PrivateVehicle[playerid][vehSlot][vehPosA], PrivateVehicle[playerid][vehSlot][vehHealth]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "%s`vehColor1`='%d', `vehColor2`='%d', `vehPaintjob`='%d', `vehSpoiler`='%d', `vehHood`='%d', ", secondQuery,
PrivateVehicle[playerid][vehSlot][vehColor1], PrivateVehicle[playerid][vehSlot][vehColor2], PrivateVehicle[playerid][vehSlot][vehPaintjob], PrivateVehicle[playerid][vehSlot][vehSpoiler], PrivateVehicle[playerid][vehSlot][vehHood]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "%s`vehRoof`='%d', `vehSideskirt`='%d', `vehLamps`='%d', `vehNitro`='%d', `vehExhaust`='%d', ", secondQuery,
PrivateVehicle[playerid][vehSlot][vehRoof], PrivateVehicle[playerid][vehSlot][vehSideskirt], PrivateVehicle[playerid][vehSlot][vehLamps], PrivateVehicle[playerid][vehSlot][vehNitro], PrivateVehicle[playerid][vehSlot][vehExhaust]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "%s`vehWheels`='%d', `vehStereo`='%d', `vehHydraulics`='%d', `vehFrontBumper`='%d', `vehRearBumper`='%d', ", secondQuery,
PrivateVehicle[playerid][vehSlot][vehWheels], PrivateVehicle[playerid][vehSlot][vehStereo], PrivateVehicle[playerid][vehSlot][vehHydraulics], PrivateVehicle[playerid][vehSlot][vehFrontBumper], PrivateVehicle[playerid][vehSlot][vehRearBumper]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "%s`vehVentRight`='%d', `vehVentLeft`='%d', `vehPreis`='%d', `vehNeonID`='%d', `vehNumberPlate`='%s', `vehFuel`='%f', ", secondQuery,
PrivateVehicle[playerid][vehSlot][vehVentRight], PrivateVehicle[playerid][vehSlot][vehVentLeft], PrivateVehicle[playerid][vehSlot][vehPreis], PrivateVehicle[playerid][vehSlot][vehNeonID], PrivateVehicle[playerid][vehSlot][vehNumberPlate], Vehicle[PrivateVehicle[playerid][vehSlot][vehID]][vehFuel]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "%s`vehKMStand`='%f', `vehInterior`='%d', `vehWorld`='%d', `vehAbgeschleppt`='%d', `vehAbgeschlepptVon`='%s', ", secondQuery,
Vehicle[PrivateVehicle[playerid][vehSlot][vehID]][vehKMStand], PrivateVehicle[playerid][vehSlot][vehInterior], PrivateVehicle[playerid][vehSlot][vehWorld], PrivateVehicle[playerid][vehSlot][vehAbgeschleppt], PrivateVehicle[playerid][vehSlot][vehAbgeschlepptVon]);
strcat(mainQuery, secondQuery);
format(secondQuery, sizeof(secondQuery), "%s`vehDestroyed`='%d', `vehKaution`='%d' WHERE `vehBesitzer`='%s' AND `Slot`='%d' ", secondQuery,
PrivateVehicle[playerid][vehSlot][vehBesitzer], vehSlot);
strcat(mainQuery, secondQuery);
mysql_function_query(MySqlConnection, secondQuery, false, "", "");
print(secondQuery);
strdel(mainQuery, 0, sizeof(mainQuery));
strdel(secondQuery, 0, sizeof(secondQuery));
}
}
}
}
Alles anzeigen