- Регистрация
- 14 Янв 2019
- Сообщения
- 22
- Лучшие ответы
- 0
- Репутация
- 1
Все привет, пишу систему авто, написал загрузку на MySQL R39-6. Добавил 1 автомобиль в базу, пишет, что он загружен в консоли, но выдает логи.
Логи:
Загрузка:
И не создается авто.
Структура таблицы:
Логи:
Код:
[23:30:23 01/14/19] [DEBUG] Calling callback "LoadCars"..
[23:30:23 01/14/19] [DEBUG] cache_get_data - connection: 1
[23:30:23 01/14/19] [DEBUG] cache_get_field_content - row: 1, field_name: "Owner", connection: 1, max_len: 25
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [DEBUG] cache_get_field_content - row: 1, field_name: "Number", connection: 1, max_len: 25
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "ID", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Color_1", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Color_2", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Price", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Model", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Fuel", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_float - row: 1, field_name: "Milliage", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_float - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Lock", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_float - row: 1, field_name: "X", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_float - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_float - row: 1, field_name: "Y", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_float - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_float - row: 1, field_name: "Z", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_float - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_float - row: 1, field_name: "Angle", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_float - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Engine", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Doors", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Lights", connection: 1
[23:30:23 01/14/19] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `cars` ORDER BY `ID`")
[23:30:23 01/14/19] [ERROR] cache_get_field_content_int - invalid datatype
[23:30:23 01/14/19] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
Код:
fpublic LoadCars()
{
new rows, fields;
cache_get_data(rows, fields);
if(!rows) return false;
for(new i = 1; i <= rows; i++)
{
cache_get_field_content(i, "Owner", Car[i][cOwner], connect_mysql);
cache_get_field_content(i, "Number", Car[i][cOwner], connect_mysql);
Car[i][cID] = cache_get_field_content_int(i, "ID", connect_mysql);
Car[i][cColor_1] = cache_get_field_content_int(i, "Color_1", connect_mysql);
Car[i][cColor_2] = cache_get_field_content_int(i, "Color_2", connect_mysql);
Car[i][cPrice] = cache_get_field_content_int(i, "Price", connect_mysql);
Car[i][cModel] = cache_get_field_content_int(i, "Model", connect_mysql);
Car[i][cFuel] = cache_get_field_content_int(i, "Fuel", connect_mysql);
Car[i][cMilliage] = cache_get_field_content_float(i, "Milliage", connect_mysql);
Car[i][cLock] = cache_get_field_content_int(i, "Lock", connect_mysql);
Car[i][cPos_X] = cache_get_field_content_float(i, "X", connect_mysql);
Car[i][cPos_Y] = cache_get_field_content_float(i, "Y", connect_mysql);
Car[i][cPos_Z] = cache_get_field_content_float(i, "Z", connect_mysql);
Car[i][cAngle] = cache_get_field_content_float(i, "Angle", connect_mysql);
Car[i][cEngine] = cache_get_field_content_int(i, "Engine", connect_mysql);
Car[i][cDoors] = cache_get_field_content_int(i, "Doors", connect_mysql);
Car[i][cLights] = cache_get_field_content_int(i, "Lights", connect_mysql);
TOTALCARS++;
}
printf("Загружено автомобилей - %d", TOTALCARS);
for(new ic; ic < TOTALCARS; ic++)
{
CreateVehicle(Car[ic][cModel], Car[ic][cPos_X], Car[ic][cPos_Y], Car[ic][cPos_Z], Car[ic][cAngle], Car[ic][cColor_1],
Car[ic][cColor_2], 3600);
}
return true;
}
Структура таблицы: