PDA

Просмотр полной версии : [Вопрос] Крашнулся сервер.



Georgiy1308
27.12.2014, 09:54
Здравствуйте, крашнулся сервер, как исправить что-бы больше некогда не крашался?
Такого еще небыло.

[05:24:31] Аккаунт Vladyslav_Zozulia был успешно сохранён.(1979)
[05:24:31] [part] Vladyslav_Zozulia has left the server (0:0)
[05:33:20] Аккаунт Sam_Vinewood был успешно сохранён.(1967)
[05:33:20] [part] Sam_Vinewood has left the server (1:1)
[06:00:18] [debug] Server crashed due to an unknown error
[06:00:18] [debug] Native backtrace:

L0ndl3m
27.12.2014, 12:04
[06:00:18] [debug] Server crashed due to an unknown error
Как думаете, сможем ли мы Вам помочь?

Georgiy1308
29.12.2014, 10:42
А как узнать ошибку?
Сегодня тоже самое...

[06:00:23] [debug] Server crashed due to an unknown error
[06:00:23] [debug] Native backtrace:

L0ndl3m
29.12.2014, 13:21
Никак. Узнавайте когда это происходит.

Georgiy1308
30.12.2014, 00:19
Вот ошибка, в техх поддержке мне написали: Битый паблик.

[09:16:07] [debug] Accessing element at index 1266 past array upper bound 1265 [09:16:07] [debug] AMX backtrace: [09:16:07] [debug] #0 000b693c in public LoadProperty () from SharpRP.

L0ndl3m
30.12.2014, 00:41
Выкладывайте паблик / сток LoadProperty.

Georgiy1308
30.12.2014, 16:35
publics: LoadProperty()
{
static rows, fields;
cache_get_data(rows, fields);
new temp[64],i=0;
if(rows)
{
for(new he = 0;he < rows; he++)
{
cache_get_row(he, 0, temp), HouseInfo[he][hID] = strval(temp);
cache_get_row(he, 1, temp), HouseInfo[he][hEntrancex] = floatstr(temp);
cache_get_row(he, 2, temp), HouseInfo[he][hEntrancey] = floatstr(temp);
cache_get_row(he, 3, temp), HouseInfo[he][hEntrancez] = floatstr(temp);
cache_get_row(he, 4, temp), HouseInfo[he][hExitx] = floatstr(temp);
cache_get_row(he, 5, temp), HouseInfo[he][hExity] = floatstr(temp);
cache_get_row(he, 6, temp), HouseInfo[he][hExitz] = floatstr(temp);
cache_get_row(he, 7, temp), strmid(HouseInfo[he][hOwner], temp, 0, strlen(temp), 255);
cache_get_row(he, 8, temp), HouseInfo[he][hValue] = strval(temp);
cache_get_row(he, 9, temp), HouseInfo[he][hHel] = strval(temp);
cache_get_row(he, 10, temp), HouseInfo[he][hInt] = strval(temp);
cache_get_row(he, 11, temp), HouseInfo[he][hLock] = strval(temp);
cache_get_row(he, 12, temp), HouseInfo[he][hOwned] = strval(temp);
cache_get_row(he, 13, temp), HouseInfo[he][hTakings] = strval(temp);
cache_get_row(he, 14, temp), HouseInfo[he][hVec] = strval(temp);
cache_get_row(he, 15, temp), HouseInfo[he][hVcol1] = strval(temp);
cache_get_row(he, 16, temp), HouseInfo[he][hVcol2] = strval(temp);
cache_get_row(he, 17, temp), HouseInfo[he][hKlass] = strval(temp);
cache_get_row(he, 18, temp), HouseInfo[he][hVehSost] = strval(temp);
cache_get_row(he, 19, temp), HouseInfo[he][hCarx] = floatstr(temp);
cache_get_row(he, 20, temp), HouseInfo[he][hCary] = floatstr(temp);
cache_get_row(he, 21, temp), HouseInfo[he][hCarz] = floatstr(temp);
cache_get_row(he, 22, temp), HouseInfo[he][hCarc] = floatstr(temp);
cache_get_row(he, 23, temp), HouseInfo[he][hMats] = strval(temp);
cache_get_row(he, 24, temp), HouseInfo[he][hStyle] = strval(temp);
cache_get_row(he, 25, temp), HouseInfo[he][hSost] = strval(temp);
i++;
if(HouseInfo[he][hOwned] == 0)
{
HouseInfo[he][hPickup] = CreatePickup(1273, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 31, COLOR_WHITE, 0, -1, -1, 50.0);
}
if(HouseInfo[he][hOwned] == 1)
{
HouseInfo[he][hPickup] = CreatePickup(1272, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 32, COLOR_WHITE, 0, -1, -1, 50.0);
}
}
printf("[V] Loaded %d houses",i);
}
else printf("[X] Houses not loaded");
return true;
}

L0ndl3m
30.12.2014, 18:30
for(new he = 0;he < rows; he++)
на

for(new he = 0; he < sizeof(HouseInfo); he++)

Georgiy1308
31.12.2014, 10:10
Не помогло, опять крашнулся сервер...

[06:00:18] [debug] Server crashed due to an unknown error
[06:00:18] [debug] Native backtrace:

Dima_Tushin
01.01.2015, 20:46
Пробуй на ARM


stock LoadHouse() mysql_function_query(MYSQL, "SELECT * FROM `house` ORDER BY `house`.`hID` ASC", true, "LoadProperty", "");
publics: LoadProperty()
{
new r, d, dom = 0;
cache_get_data(r, d);
if(r)
{
for(new i = 0; i < r; i++)
{
new ORM:ormid = orm_create("house");//Название вашей базы данных Домов
orm_addvar_int(ormid, HouseInfo[i][hID], "hID");
orm_addvar_float(ormid, HouseInfo[i][hEntrancex], "hEntrancex");
orm_addvar_float(ormid, HouseInfo[i][hEntrancey], "hEntrancey");
orm_addvar_float(ormid, HouseInfo[i][hEntrancez], "hEntrancez");
orm_addvar_float(ormid, HouseInfo[i][hExitx], "hExitx");
orm_addvar_float(ormid, HouseInfo[i][hExity], "hExity");
orm_addvar_float(ormid, HouseInfo[i][hExitz], "hExitz");
orm_addvar_string(ormid, HouseInfo[i][hOwner], MAX_PLAYER_NAME, "hOwner");
orm_addvar_int(ormid, HouseInfo[i][hValue], "hValue");
orm_addvar_int(ormid, HouseInfo[i][hHel], "hHel");
orm_addvar_int(ormid, HouseInfo[i][hInt], "hInt");
orm_addvar_int(ormid, HouseInfo[i][hLock], "hLock");
orm_addvar_int(ormid, HouseInfo[i][hOwned], "hOwned");
orm_addvar_int(ormid, HouseInfo[i][hTakings], "hTakings");
orm_addvar_int(ormid, HouseInfo[i][hVec], "hVec");
orm_addvar_int(ormid, HouseInfo[i][hVcol1], "hVcol1");
orm_addvar_int(ormid, HouseInfo[i][hVcol2], "hVcol2");
orm_addvar_int(ormid, HouseInfo[i][hKlass], "hKlass");
orm_addvar_int(ormid, HouseInfo[i][hVehSost], "hVehSost");
orm_addvar_float(ormid, HouseInfo[i][hCarx], "hCarx");
orm_addvar_float(ormid, HouseInfo[i][hCary], "hCary");
orm_addvar_float(ormid, HouseInfo[i][hCarz], "hCarz");
orm_addvar_float(ormid, HouseInfo[i][hCarc], "hCarc");
orm_addvar_int(ormid, HouseInfo[i][hMats], "hMats");
orm_addvar_int(ormid, HouseInfo[i][hStyle], "hStyle");
orm_addvar_int(ormid, HouseInfo[i][hSost], "hSost");
orm_apply_cache(ormid, i);
if(HouseInfo[i][hOwned] == 0)
{
HouseInfo[i][hPickup] = CreatePickup(1273, 23, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez],-1);
HouseInfo[i][hMIcon] = CreateDynamicMapIcon(HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez], 31, COLOR_WHITE, 0, -1, -1, 50.0);
}
if(HouseInfo[i][hOwned] == 1)
{
HouseInfo[i][hPickup] = CreatePickup(1272, 23, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez],-1);
HouseInfo[i][hMIcon] = CreateDynamicMapIcon(HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez], 32, COLOR_WHITE, 0, -1, -1, 50.0);
}
dom++;
}
printf("LoadHouse:\t%d",dom);
}
else printf("LoadHouse:\t%d", dom);
return true;
}
Если есть такой stock то не надо добавлять!


stock LoadHouse() mysql_function_query(MYSQL, "SELECT * FROM `house` ORDER BY `house`.`hID` ASC", true, "LoadProperty", "");

Georgiy1308
02.01.2015, 01:13
Ребята, я вроде нашел проблему. В моде было найдено:

SetTimer("AutoRestart", 60000, 1);
АвтоРестарт.
Утром отпишусь скажу из за этого или нет.