invalid row index ('1') mysql
#1

Hi all,
I've a little problem with cache_get_field_content_int.

When I start my server, mysql_log give me this errors:
Код:
[15:48:24] [DEBUG] mysql_connect - host: "92.222.37.187", user: "admin_rp2", database: "admin_rp", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[15:48:24] [DEBUG] CMySQLHandle::Create - creating new connection..
[15:48:24] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[15:48:24] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[15:48:24] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:48:24] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:48:24] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:48:24] [DEBUG] mysql_errno - connection: 1
[15:48:24] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `vehicles` ORDER BY `Id` ASC LIMIT 20000", callback: "OnVehiclesLoad", format: "(null)"
[15:48:24] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:48:24] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:48:24] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:48:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:48:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:48:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:48:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:48:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:48:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:48:25] [DEBUG] CMySQLQuery::Execute[OnVehiclesLoad] - starting query execution
[15:48:25] [DEBUG] CMySQLQuery::Execute[OnVehiclesLoad] - query was successfully executed within 59.327 milliseconds
[15:48:25] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[15:48:25] [DEBUG] Calling callback "OnVehiclesLoad"..
[15:48:25] [DEBUG] cache_get_data - connection: 1
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Id", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Model", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_float - row: 1, field_name: "PosX", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_float - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_float - row: 1, field_name: "PosY", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_float - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_float - row: 1, field_name: "PosZ", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_float - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_float - row: 1, field_name: "PosA", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_float - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Color_0", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Color_1", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Siren", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_0", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_1", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_2", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_3", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_4", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_5", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_6", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_7", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_8", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_9", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_10", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_11", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Mod_12", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Paintjob", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Damage_0", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Damage_1", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Damage_2", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Damage_3", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_float - row: 1, field_name: "Health", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_float - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Windows_0", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Windows_1", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Windows_2", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Windows_3", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Doors", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content - row: 1, field_name: "Plate", connection: 1, max_len: 21
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Fuel", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_0", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_1", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_2", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_3", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_4", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_5", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_6", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_7", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_8", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_9", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_10", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_11", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_12", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_13", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_14", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_15", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_16", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_17", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_18", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Trunk_19", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_0", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_1", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_2", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_3", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_4", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_5", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_6", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_7", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_8", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_9", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_10", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_11", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_12", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_13", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_14", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_15", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_16", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_17", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_18", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "TrunkQuantity_19", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Faction", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content_int - row: 1, field_name: "Owned", connection: 1
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [ERROR] cache_get_field_content_int - invalid datatype
[15:48:25] [DEBUG] cache_get_field_content - row: 1, field_name: "Owner", connection: 1, max_len: 25
[15:48:25] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1')
[15:48:25] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
Query is this (I've putted this in OnGameModeInit)-:
Код:
mysql_tquery(dbHandler, "SELECT * FROM `vehicles` ORDER BY `Id` ASC LIMIT 2000", "OnVehiclesLoad");
And OnVehiclesLoad:
Код:
public OnVehiclesLoad()
{
	new rows, fields;
	cache_get_data(rows, fields, dbHandler);

	if(rows) {
		for(new i = 1; i <= rows; i++) {
			g_VehicleData[i][eId] = cache_get_field_content_int(i, "Id", dbHandler);
			g_VehicleData[i][eModel] = cache_get_field_content_int(i, "Model", dbHandler);
			g_VehicleData[i][ePos][0] = cache_get_field_content_float(i, "PosX", dbHandler);
			g_VehicleData[i][ePos][1] = cache_get_field_content_float(i, "PosY", dbHandler);
			g_VehicleData[i][ePos][2] = cache_get_field_content_float(i, "PosZ", dbHandler);
			g_VehicleData[i][ePos][3] = cache_get_field_content_float(i, "PosA", dbHandler);
			for(new c = 0; c < 2; c++) g_VehicleData[i][eColor][c] = cache_get_field_content_int(i, sprintf("Color_%d", c), dbHandler);
			g_VehicleData[i][eSiren] = cache_get_field_content_int(i, "Siren", dbHandler);
			for(new m = 0; m < 13; m++) g_VehicleData[i][eMod][m] = cache_get_field_content_int(i, sprintf("Mod_%d", m), dbHandler);
			g_VehicleData[i][ePaintjob] = cache_get_field_content_int(i, "Paintjob", dbHandler);
			for(new d = 0; d < 4; d++) g_VehicleData[i][eDamage][d] = cache_get_field_content_int(i, sprintf("Damage_%d", d), dbHandler);
			g_VehicleData[i][eHealth] = cache_get_field_content_float(i, "Health", dbHandler);
			for(new w = 0; w < 4; w++) g_VehicleData[i][eWindows][w] = cache_get_field_content_int(i, sprintf("Windows_%d", w), dbHandler);
			g_VehicleData[i][eDoors] = cache_get_field_content_int(i, "Doors", dbHandler);
			cache_get_field_content(i, "Plate", g_VehicleData[i][ePlate], dbHandler, 21);
			g_VehicleData[i][eFuel] = cache_get_field_content_int(i, "Fuel", dbHandler);
			for(new t = 0; t < 20; t++) g_VehicleData[i][eTrunk][t] = cache_get_field_content_int(i, sprintf("Trunk_%d", t), dbHandler);
			for(new tq = 0; tq < 20; tq++) g_VehicleData[i][eTrunkQuantity][tq] = cache_get_field_content_int(i, sprintf("TrunkQuantity_%d", tq), dbHandler);
			g_VehicleData[i][eFaction] = cache_get_field_content_int(i, "Faction", dbHandler);
			g_VehicleData[i][eOwned] = cache_get_field_content_int(i, "Owned", dbHandler);
			cache_get_field_content(i, "Owner", g_VehicleData[i][eOwner], dbHandler, MAX_PLAYER_NAME+1);

			g_VehicleData[i][eScript] = CreateVehicle(g_VehicleData[i][eModel], g_VehicleData[i][ePos][0], g_VehicleData[i][ePos][1], g_VehicleData[i][ePos][2], g_VehicleData[i][ePos][3], g_VehicleData[i][eColor][0], g_VehicleData[i][eColor][1], -1, g_VehicleData[i][eSiren]);
			SetVehicleHealth(g_VehicleData[i][eScript], g_VehicleData[i][eHealth]);
			SetVehicleNumberPlate(g_VehicleData[i][eScript], g_VehicleData[i][ePlate]);
			ChangeVehiclePaintjob(g_VehicleData[i][eScript], g_VehicleData[i][ePaintjob]);
			for(new am = 0; am < 13; am++) AddVehicleComponent(g_VehicleData[i][eScript], g_VehicleData[i][eMod][am]);
			UpdateVehicleDamageStatus(g_VehicleData[i][eScript], g_VehicleData[i][eDamage][0], g_VehicleData[i][eDamage][1], g_VehicleData[i][eDamage][2], g_VehicleData[i][eDamage][3]);
			SetVehicleParamsCarWindows(g_VehicleData[i][eScript], g_VehicleData[i][eWindows][0], g_VehicleData[i][eWindows][1], g_VehicleData[i][eWindows][2], g_VehicleData[i][eWindows][3]);
			SetVehicleParamsEx(g_VehicleData[i][eScript], VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, g_VehicleData[i][eDoors], VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF);
		}
	}
	return 1;
}
Table:


Where is the problem?

Thanks in advance.
Reply
#2

That is because rows start counting from 0. If you were to have two rows, it would load the second row instead of the first. That'll give you the wrong result.

Assign your for loop value 'i' to 0 instead of 1.
PHP код:
for(new 0rowsi++) 
Reply
#3

Rows start from 0 and it shouldn't be "i <= rows;" but "i < rows;"
Reply
#4

Work, thank both. +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)