Проблема с sampSendDialogResponse

shadow80962

Известный
Автор темы
129
14
Версия MoonLoader
.026-beta
Не оправляет текст report_settings.TextReportHandedOverAdmin

Lua:
// сfg
report =
{
  textReportHandedOverAdmin = u8'Уважаемый игрок, передал ваш репорт администратору!',
}

local report_settings = 
{
    textReportHandedOverAdmin = new.char[144](cfg.report.textReportHandedOverAdmin),
}


 if imgui.Button(fa.ICON_FA_SHARE .. u8' Передать репорт', imgui.ImVec2(192, 20)) then
            sampSendChat("/a [Tools | Репорт] ".. dataWindowReport.nickname ..": >> ".. dataWindowReport.text .." <<")
            sampSendDialogResponse(32700, 1, nil, report_settings.TextReportHandedOverAdmin)
            Window_Report[0] = false
        end
 

shadow80962

Известный
Автор темы
129
14
Теперь получаю краш игры с причиной
SA-MP 0.3.7
Exception At Address: 0x65CCC713
Base: 0x03ED0000

Вот что у меня получилось:
Lua:
if imgui.Button(fa.ICON_FA_SHARE .. u8' Передать репорт', imgui.ImVec2(192, 20)) then
            sampSendChat("/a [ETools | Репорт] ".. dataWindowReport.nickname ..": >> ".. dataWindowReport.text .." <<")
            sampSendDialogResponse(32700, 1, nil, u8:decode(ffi.string(report_settings.TextReportHandedOverAdmin)))
            Window_Report[0] = false
        end