01.11.2016, 01:02
Код:
QUERY = INSERT INTO `cars` bla bla ---------------
Код:
forward InsertBuyCar(playerid); public InsertBuyCar(playerid) { new dest2[128],dest[128]; new testcar = CreateVehicle(422,-10,-10,-10,0,0,0,-1); new vehicleid = testcar; DestroyVehicle(testcar); new i = cache_insert_id(); CarsInfo[vehicleid][vID] = cache_get_field_content_int(i, "ID"); cache_get_field_content(i, "Owner",dest); format(CarsInfo[vehicleid][vOwner], 128,dest); CarsInfo[vehicleid][vModel] = cache_get_field_content_int(i, "Model"); CarsInfo[vehicleid][vSpawnX] = cache_get_field_content_float(i, "SpawnX"); CarsInfo[vehicleid][vSpawnY] = cache_get_field_content_float(i, "SpawnY"); CarsInfo[vehicleid][vSpawnZ] = cache_get_field_content_float(i, "SpawnZ"); CarsInfo[vehicleid][vSpawnA] = cache_get_field_content_float(i, "SpawnA"); CarsInfo[vehicleid][vColor1] = cache_get_field_content_int(i, "Color1"); CarsInfo[vehicleid][vColor2] = cache_get_field_content_int(i, "Color2"); ......................................................................... CarsInfo[vehicleid][vFuel] = cache_get_field_content_int(i, "Fuel"); CarsInfo[vehicleid][vHealth] = cache_get_field_content_int(i, "Health");
Код:
In callback "InsertBuyCar" 02:46:11 cache_insert_id OK connection: 1 02:46:11 cache_get_field_content_int OK row: 0, field_name: "ID", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content OK row: 0, field_name: "Owner", connection: 1, max_len: 128 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content_int OK row: 0, field_name: "Model", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content_float OK row: 0, field_name: "SpawnX", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content_float OK row: 0, field_name: "SpawnY", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content_float OK row: 0, field_name: "SpawnZ", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content_float OK row: 0, field_name: "SpawnA", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content_int OK row: 0, field_name: "Color1", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('0') 02:46:11 cache_get_field_content_int OK row: 0, field_name: "Color2", connection: 1 ............................................................................................... 02:46:11 cache_get_field_content_int OK row: 0, field_name: "Fuel", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 cache_get_field_content_int OK row: 0, field_name: "Health", connection: 1 02:46:11 CMySQLResult::GetRowDataByName() ERROR invalid row index ('1') 02:46:11 CMySQLResult::~CMySQLResult() OK deconstructor called