- Регистрация
- 13 Апр 2018
- Сообщения
- 202
- Лучшие ответы
- 0
- Репутация
- 0
[debug] Run time error 4: "Array index out of bounds"
[20:23:04] [debug] Attempted to read/write array element at index 4824404 in array of size 1000
[20:23:04] [debug] AMX backtrace:
[20:23:04] [debug] #0 00067b60 in public ac_OnDialogResponse (playerid=0, dialogid=36, response=1, listitem=0, inputtext[]=@00495d90 "") at D:\SAMP\New Mode\gamemodes\new.pwn:2417
[20:23:04] [debug] #1 00012e74 in public OnDialogResponse (playerid=0, dialogid=36, response=1, listitem=0, inputtext[]=@00495d90 "") at D:\SAMP\New Mode\pawno\include\nex-ac.inc:3693
PHP:
case 36:
{
new house = PlayerInfo[house][pHouse];
if(!response) return callcmd::house(playerid);
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pMoney] < 2500) return SendClientMessage(playerid, COLOR_RED, !">> {FFFFFF}У Вас не хватает денег!");
if(HouseInfo[house][hCupboard] == 1) return SendClientMessage(playerid, COLOR_GOLD, !">> {FFFFFF}У Вас уже приобретено данное улучшение!");
HouseInfo[house][hCupboard] = 1;
PlayerInfo[playerid][pMoney] -= 2500;
SendClientMessage(playerid, COLOR_GOLD, !">> {FFFFFF}Вы успешно приобрели улучшение 'Шкаф'. Теперь Вы сможете пользоваться им!");
}
case 1:
{
if(PlayerInfo[playerid][pMoney] < 15000) return SendClientMessage(playerid, COLOR_RED, !">> {FFFFFF}У Вас не хватает денег!");
if(HouseInfo[house][hBar] == 1) return SendClientMessage(playerid, COLOR_GOLD, !">> {FFFFFF}У Вас уже приобретено данное улучшение!");
HouseInfo[house][hBar] = 1;
PlayerInfo[playerid][pMoney] -= 15000;
SendClientMessage(playerid, COLOR_GOLD, !">> {FFFFFF}Вы успешно приобрели улучшение 'Минибар'. Теперь Вы сможете пользоваться им!");
}
case 2:
{
if(PlayerInfo[playerid][pMoney] < 7500) return SendClientMessage(playerid, COLOR_RED, !">> {FFFFFF}У Вас не хватает денег!");
if(HouseInfo[house][hSafe] == 1) return SendClientMessage(playerid, COLOR_GOLD, !">> {FFFFFF}}У Вас уже приобретено данное улучшение!");
HouseInfo[house][hSafe] = 1;
PlayerInfo[playerid][pMoney] -= 7500;
SendClientMessage(playerid, COLOR_GOLD, !">> {FFFFFF}Вы успешно приобрели улучшение 'Сейф'. Теперь Вы сможете пользоваться им!");
}
case 3:
{
SendClientMessage(playerid, COLOR_RED, ">> {FFFFFF}Система ремонта в разработке !");
}
}
new string[98];
format(string, sizeof(string),
"Название\tСостояние\n\
Шкаф\t%s\n\
Бар\t%s\n\
Сейф\t%s\n\
Интерьер дома",
(HouseInfo[house][hCupboard] != 0) ? ("Приобретено") : ("2500$"),
(HouseInfo[house][hBar] != 0) ? ("Приобретено") : ("15000$"),
(HouseInfo[house][hSafe] != 0) ? ("Приобретено") : ("7500$"));
ShowPlayerDialog(playerid, 36, DIALOG_STYLE_TABLIST_HEADERS, !"Улучшить дом", string, !"Выбрать", !"Отмена");
SaveHouse(house);
}