- Регистрация
- 30 Мар 2016
- Сообщения
- 197
- Лучшие ответы
- 3
- Репутация
- 15
Вот суть ошибки
Это от public ac_OnDialogResponse
Вот
PHP:
Run time error 4: "Array index out of bounds"
[20/07/2019 21:02:31] Attempted to read/write array element at negative index -1
[20/07/2019 21:02:31] AMX backtrace:
[20/07/2019 21:02:31] #0 0073efcc in ShowPlayerAdminReportAnswer (playerid=0, report_id=1)
#1 0009d398 in public ac_OnDialogResponse (playerid=0, dialogid=26188, response=1, listitem=0, inputtext[]=@00b03de8 "2. 21:02:12") #2 0001384c in public OnDialogResponse (playerid=0, dialogid=26188, response=1, listitem=0, inputtext[]=@00b03de8 "2. 21:02:12")
PHP:
if(gReport[listitem + 1][rIsTooked] == false) ShowPlayerAdminReportAnswer(playerid, listitem + 1);
PHP:
stock ShowPlayerAdminReportAnswer(playerid, report_id)
{
SetPVarInt(playerid, "report_id_to_answer", report_id);
//new target_id = gReport[report_id][rPlayerID];
gReport[report_id][rIsTooked] = true;
static const gText[] =
{
"{FFFFFF}Автор сообщения:{FF8C00}\t%s\n"\
"{FFFFFF}Вопрос:\t\t{FF8C00}%s{FFFFFF}\n"\
"{FFFFFF}Дата публикации:{FF8C00}\t%s\n"\
"{FFFFFF}Пожалуйста, введите свой ответ в поле ниже"
};
new
string[sizeof(gText)+200];
format(string, sizeof string, gText, PlayerInfo[gReport[report_id][rPlayerID]][pNames], gReport[report_id][rText], gReport[report_id][rWhenWroted_Text]);
ShowPlayerDialog(playerid, 26189, DIALOG_STYLE_INPUT, "{FF8C00}Просмотр сообщения администраторам", string, "Ответить", "Удалить");
return 1;
}
Последнее редактирование: