PDA

Просмотр полной версии : [Вопрос] ошибка в логах MySQL



wea
26.01.2016, 13:57
Всем привет.
У меня такая вот проблема в логах

[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_int - invalid datatype
[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_float - invalid datatype
[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_float - invalid datatype
[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_float - invalid datatype
[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_float - invalid datatype
[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_float - invalid datatype
[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_float - invalid datatype
[23:22:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('8')
[23:22:01] [ERROR] cache_get_field_content_int - invalid datatype

Вот из за этого кода:

forward LoadEnters();
public LoadEnters()
{
new string[156];
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
for(new idx = 0; idx <= rows; idx++)
{
E::[idx][eID] = cache_get_field_content_int(idx,"eID", database);
E::[idx][eP][0] = cache_get_field_content_float(idx,"eP1", database);
E::[idx][eP][1] = cache_get_field_content_float(idx,"eP2", database);
E::[idx][eP][2] = cache_get_field_content_float(idx,"eP3", database);
E::[idx][ePe][0] = cache_get_field_content_float(idx,"ePe1", database);
E::[idx][ePe][1] = cache_get_field_content_float(idx,"ePe2", database);
E::[idx][ePe][2] = cache_get_field_content_float(idx,"ePe3", database);
E::[idx][eInt][0] = cache_get_field_content_int(idx,"eInt", database);
E::[idx][eInt][1] = cache_get_field_content_int(idx,"eWorld",database);
cache_get_field_content(idx,"eName", E::[idx][eName], database,32);
CreateDynamicPickup(19132,23,E::[idx][eP][0],E::[idx][eP][1],E::[idx][eP][2]);
CreateDynamicPickup(19132,23,E::[idx][ePe][0],E::[idx][ePe][1],E::[idx][ePe][2],E::[idx][eInt][1]);
format(string,sizeof(string),"{AA3333}[ {ffffff}%s {AA3333}]\n"cBLUEe"ALT",E::[idx][eName]);
CreateDynamic3DTextLabel(string,COLOR_BLUE,E::[idx][eP][0],E::[idx][eP][1],E::[idx][eP][2],5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1);
CreateDynamic3DTextLabel("{AA3333}[ {ffffff}Выход {AA3333}]\n"cBLUEe"ALT",COLOR_BLUE,E::[idx][ePe][0],E::[idx][ePe][1],E::[idx][ePe][2],5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,-1,E::[idx][eInt][1]);
cEnters ++;
}
printf("Таблица `enters` успешно загружена!");
}
else printf("Таблица `enters` не загружена!");
return true;
}

в базе записано так:

CREATE TABLE IF NOT EXISTS `enters` (
`eID` int(11) NOT NULL AUTO_INCREMENT,
`eP1` float NOT NULL,
`eP2` float NOT NULL,
`eP3` float NOT NULL,
`ePe1` float NOT NULL,
`ePe2` float NOT NULL,
`ePe3` float NOT NULL,
`eInt` int(11) NOT NULL,
`eWorld` int(11) NOT NULL,
`eName` varchar(32) NOT NULL,
PRIMARY KEY (`eID`)
) ENGINE=InnoDB DEFAULT CHARSET=cp1251 AUTO_INCREMENT=8 ;

--
-- Дамп данных таблицы `enters`
--

INSERT INTO `enters` (`eID`, `eP1`, `eP2`, `eP3`, `ePe1`, `ePe2`, `ePe3`, `eInt`, `eWorld`, `eName`) VALUES
(1, 1139, -1211.76, 18.7432, 1138.59, -1212.5, 905.066, 1, 0, 'Таксопарк'),
(2, -1957.12, -2358.23, 773.89, -1938.34, -2243.88, 773.89, 1, 0, 'Раздевалка'),
(3, -2029.14, -2381.99, 30.625, -1978.25, -2363.29, 773.89, 1, 0, 'Цех'),
(4, -2007.68, -2367.02, 30.625, -1954.22, -2367.6, 773.89, 1, 0, 'Цех'),
(5, -516.118, -506.112, 25.5234, -516.114, -508.241, 25.5459, 0, 0, 'Склады'),
(6, 220.546, 1968.73, 18.2509, 316.344, -170.294, 999.594, 6, 1, 'Ammo Army 51'),
(7, -1006.63, -696.16, 32.0078, 2576.84, -1289.92, 1044.12, 2, 0, 'Оружейный завод'),
(8, 602.18, 867.857, -42.9609, 509.395, 877.074, 3007.95, 1, 1, 'Шахта');


помогите если не сложно

DeimoS
26.01.2016, 14:32
forward LoadEnters();
public LoadEnters()
{
new string[156];
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
for(new idx = 0; idx < rows; idx++)
{
E::[idx][eID] = cache_get_field_content_int(idx,"eID", database);
E::[idx][eP][0] = cache_get_field_content_float(idx,"eP1", database);
E::[idx][eP][1] = cache_get_field_content_float(idx,"eP2", database);
E::[idx][eP][2] = cache_get_field_content_float(idx,"eP3", database);
E::[idx][ePe][0] = cache_get_field_content_float(idx,"ePe1", database);
E::[idx][ePe][1] = cache_get_field_content_float(idx,"ePe2", database);
E::[idx][ePe][2] = cache_get_field_content_float(idx,"ePe3", database);
E::[idx][eInt][0] = cache_get_field_content_int(idx,"eInt", database);
E::[idx][eInt][1] = cache_get_field_content_int(idx,"eWorld",database);
cache_get_field_content(idx,"eName", E::[idx][eName], database,32);
CreateDynamicPickup(19132,23,E::[idx][eP][0],E::[idx][eP][1],E::[idx][eP][2]);
CreateDynamicPickup(19132,23,E::[idx][ePe][0],E::[idx][ePe][1],E::[idx][ePe][2],E::[idx][eInt][1]);
format(string,sizeof(string),"{AA3333}[ {ffffff}%s {AA3333}]\n"cBLUEe"ALT",E::[idx][eName]);
CreateDynamic3DTextLabel(string,COLOR_BLUE,E::[idx][eP][0],E::[idx][eP][1],E::[idx][eP][2],5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1);
CreateDynamic3DTextLabel("{AA3333}[ {ffffff}Выход {AA3333}]\n"cBLUEe"ALT",COLOR_BLUE,E::[idx][ePe][0],E::[idx][ePe][1],E::[idx][ePe][2],5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,-1,E::[idx][eInt][1]);
cEnters ++;
}
printf("Таблица `enters` успешно загружена!");
}
else printf("Таблица `enters` не загружена!");
return true;
}