- Регистрация
- 13 Апр 2018
- Сообщения
- 202
- Лучшие ответы
- 0
- Репутация
- 0
PHP:
12:44:10] [debug] Run time error 4: "Array index out of bounds"
[12:44:10] [debug] Accessing element at index 16 past array upper bound 15
[12:44:10] [debug] AMX backtrace:
[12:44:10] [debug] #0 00102974 in public LoadBizz () at C:\Users\#Benjamin\Desktop\Way Of Life (ФИКС БАГОВ 2.0)\gamemodes\backup.pwn:23335
PHP:
publics: LoadBizz()
{
new rows, fields, str[300], he;
cache_get_data(rows, fields);
if(rows)
{
for(he = 0;he < rows; he++)
{
BizzInfo[he][bID] = cache_get_row_int(he, 0); // 2333
BizzInfo[he][bOwned] = cache_get_row_int(he, 1);
cache_get_row(he, 2, BizzInfo[he][bOwner]);
cache_get_row(he, 3, BizzInfo[he][bMessage]);
cache_get_row(he, 4, BizzInfo[he][bExtortion]);
BizzInfo[he][bEntranceX] = cache_get_row_float(he, 5);
BizzInfo[he][bEntranceY] = cache_get_row_float(he, 6);
BizzInfo[he][bEntranceZ] = cache_get_row_float(he, 7);
BizzInfo[he][bExitX] = cache_get_row_float(he, 8);
BizzInfo[he][bExitY] = cache_get_row_float(he, 9);
BizzInfo[he][bExitZ] = cache_get_row_float(he, 10);
BizzInfo[he][bBuyPrice] = cache_get_row_int(he, 11);
BizzInfo[he][bEntranceCost] = cache_get_row_int(he, 12);
BizzInfo[he][bTill] = cache_get_row_int(he, 13);
BizzInfo[he][bLocked] = cache_get_row_int(he, 14);
BizzInfo[he][bInterior] = cache_get_row_int(he, 15);
BizzInfo[he][bProducts] = cache_get_row_int(he, 16);
BizzInfo[he][bMaxProducts] = cache_get_row_int(he, 17);
BizzInfo[he][bPriceProd] = cache_get_row_int(he, 18);
BizzInfo[he][b2Till] = cache_get_row_int(he, 19);
BizzInfo[he][bCena] = cache_get_row_int(he, 20);
BizzInfo[he][bBarX] = cache_get_row_float(he, 21);
BizzInfo[he][bBarY] = cache_get_row_float(he, 22);
BizzInfo[he][bBarZ] = cache_get_row_float(he, 23);
BizzInfo[he][bMafia] = cache_get_row_int(he, 24);
BizzInfo[he][bVirtual] = cache_get_row_int(he, 25);
if(BizzInfo[he][bOwned] == 0)
{
format(str, 300, "{00FF32}Цена:{FEFEFE} %d\n{F5FF00}Бизнес продаётся",BizzInfo[he][bBuyPrice]);
BizzInfo[he][bLocked] = 1;
Create3DTextLabel("~~~~~~~~~~~~~~~~~\nИспользуте команду\nв данном месте\n~~~~~~~~~~~~~~~~~",COLOR_YELLOW,BizzInfo[he][bBarX],BizzInfo[he][bBarY],BizzInfo[he][bBarZ],20.0,0,1);
BizzInfo[he][bLabel] = Create3DTextLabel(str,COLOR_YELLOW,BizzInfo[he][bEntranceX], BizzInfo[he][bEntranceY], BizzInfo[he][bEntranceZ],20.0,0,1);
BizzInfo[he][bPickupV] = AddStaticPickup(19132, 23, BizzInfo[he][bEntranceX], BizzInfo[he][bEntranceY], BizzInfo[he][bEntranceZ]);
BizzInfo[he][bPickupE] = AddStaticPickup(1318, 23, BizzInfo[he][bExitX], BizzInfo[he][bExitY], BizzInfo[he][bExitZ], BizzInfo[he][bVirtual]);
}
else if(BizzInfo[he][bOwned] == 1)
{
format(str,300, "{F0F0F0}%s\nВладелец:\n {00A5FF}%s", BizzInfo[he][bMessage], BizzInfo[he][bOwner]);
BizzInfo[he][bLabel] = Create3DTextLabel(str,TEAM_GROVE_COLOR,BizzInfo[he][bEntranceX], BizzInfo[he][bEntranceY], BizzInfo[he][bEntranceZ],20.0,0,1);
BizzInfo[he][bPickupV] = AddStaticPickup(19132, 23, BizzInfo[he][bEntranceX], BizzInfo[he][bEntranceY], BizzInfo[he][bEntranceZ]);
BizzInfo[he][bPickupE] = AddStaticPickup(1318, 23, BizzInfo[he][bExitX], BizzInfo[he][bExitY], BizzInfo[he][bExitZ], BizzInfo[he][bVirtual]);
}
else
{
BizzInfo[he][bOwned] = 1;
format(str,300, "{F0F0F0}%s\nВладелец:\n {00A5FF}%s", BizzInfo[he][bMessage], BizzInfo[he][bOwner]);
BizzInfo[he][bLabel] = Create3DTextLabel(str,TEAM_GROVE_COLOR,BizzInfo[he][bEntranceX], BizzInfo[he][bEntranceY], BizzInfo[he][bEntranceZ],20.0,0,1);
BizzInfo[he][bPickupV] = AddStaticPickup(19132, 23, BizzInfo[he][bEntranceX], BizzInfo[he][bEntranceY], BizzInfo[he][bEntranceZ]);
BizzInfo[he][bPickupE] = AddStaticPickup(1318, 23, BizzInfo[he][bExitX], BizzInfo[he][bExitY], BizzInfo[he][bExitZ], BizzInfo[he][bVirtual]);
}
}
printf("[Загрузкa] Бизнесы | Загружено %d",he);
}
else printf("Бизнесы не загружены.");
return true;
}