stock JarmuID() { new i = 0, idje = 0; for(;++i < MAX_VEHICLES ![]() { idje = i; break; } return idje; } stock JarmuKeszit(tipus , bool:elado , ar , szin1, szin2, Float:X, Float:Y, Float:Z, Float:Angle) { new vdb = JarmuID(); if(vdb > 0) { JarmuInfo[vdb][vTulajdonos] = 0; JarmuInfo[vdb][vTipus] = tipus; JarmuInfo[vdb][vSzin1] = szin1; JarmuInfo[vdb][vSzin2] = szin2; JarmuInfo[vdb][vElado] = elado; if(elado == true) { JarmuInfo[vdb][vAr] = ar; } JarmuInfo[vdb][vElet] = 1000.0; JarmuInfo[vdb][vUzemanyag] = 30; JarmuInfo[vdb][vPanelek] = 0; JarmuInfo[vdb][vLampak] = 0; JarmuInfo[vdb][vAjtok] = 0; JarmuInfo[vdb][vKerekek] = 0; JarmuInfo[vdb][vHidraulika] = 0; JarmuInfo[vdb][vMatrica] = 0; JarmuInfo[vdb][vFrakcio] = 0; JarmuInfo[vdb][vZarva] = false; JarmuInfo[vdb][vX] = X; JarmuInfo[vdb][vY] = Y; JarmuInfo[vdb][vZ] = Z; JarmuInfo[vdb][vAngle] = Angle; CreateVehicle(tipus, X, Y ,Z , Angle , szin1, szin2, 0); JarmuInfo[vdb][vID] = cache_insert_id(); new query[128]; mysql_format(kapcsolat, query, sizeof(query), "INSERT INTO `Jarmuvek` (`ID`, `Tulajdonos`, `Tipus`, `Szin1`, `Szin2`, `Elado` ,`Ar`, `Elet`, `Uzemanyag`, `Panelek`, `Lampak` , `Ajtok` , `Kerekek` , `Hidraulika`, `Matrica` , `Frakcio` , `Zar` , `PosX` , `PosY` , `PosZ` , `PosA`) VALUES ('%i', 0, '%i', '%i', '%i', '%i' , 1000, 0, 0 , 0 , 0 , 0, 0 , 0 , 0 , 0 , '%f', '%f', '%f', '%f')", JarmuInfo[vdb][vID], tipus, szin1, szin2, elado , X, Y, Z, Angle); mysql_tquery(kapcsolat, query, "", "" ); } } |
[10:18:38] [DEBUG] mysql_format - connection: 1, len: 128, format: "INSERT INTO `Jarmuvek` (`ID`, `Tulajdonos`, `Tipus`, `Szin1`, `Szin2`, `Elado` ,`Ar`, `Elet`, `Uzemanyag`, `Panelek`, `Lampak` ,..." [10:18:38] [ERROR] mysql_format - destination size is too small [10:18:38] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `Jarmuvek` (`ID`, `Tulajdonos`, `Tipus`, `Szin1`, `S", callback: "(null)", format: "(null)" [10:18:38] [DEBUG] CMySQLQuery::Execute[] - starting query execution [10:18:38] [ERROR] CMySQLQuery::Execute[] - (error #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 '' at line 1 [10:18:38] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError [10:18:41] [DEBUG] cache_insert_id - connection: 1 [10:18:41] [WARNING] cache_insert_id - no active cache |
[ERROR] mysql_format - destination size is too small |
[18:00:55] [ERROR] CMySQLQuery::Execute[] - (error #1136) Column count doesn't match value count at row 1 |
[19:13:13] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column '1' in 'field list' |
public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
{
printf("\n\nOnQueryError:\nerror: \"%s\"\nquery: \"%s\"\n\n", error, query);
return 1;
}
OnQueryError: error: "Unknown column '1' in 'field list'" query: "INSERT INTO `Jarmuvek` (`ID`, `Tulajdonos`, `Tipus`, `Szin1`, `Szin2`, `Elado` ,`Ar`, `Elet`, `Uzemanyag`, `Panelek`, `Lampak` , `Ajtok` , `Kerekek` , `Hidraulika`, `Matrica` , `Frakcio` , `Zar` , `PosX` , `PosY` , `PosZ` , `PosA`) VALUES (`1`, 0, `411`, `1`, `1`, `1` , `0` , 1000, 0, 0 , 0 , 0 , 0, 0 , 0 , 0 , 0 , -1971.674, -2378.75, 30.625, 215.133)" |
INSERT INTO Jarmuvek (ID, Tulajdonos, ..., PosZ , PosA) VALUES (%i, 0, ..., %f, %f)