сохранение настроек .ini

cort

Активный
Автор темы
276
79
Lua:
if menu == 5 then
            imgui.CenterText(u8'Выберите стиль')
            if imgui.Button(u8'Синий', imgui.ImVec2(100, 30)) then
                ChangeTheme(1)
                inicfg.save(mainIni, "NHFL.ini")
            end
            imgui.SameLine()
            if imgui.Button(u8'Красный', imgui.ImVec2(100, 30)) then
                ChangeTheme(2)
                inicfg.save(mainIni, "NHFL.ini")
            end
            imgui.SameLine()
            if imgui.Button(u8'Коричневый', imgui.ImVec2(100, 30)) then
                ChangeTheme(3)
                inicfg.save(mainIni, "NHFL.ini")
            end
            imgui.SameLine()
            if imgui.Button(u8'Аква', imgui.ImVec2(100, 30)) then
                ChangeTheme(4)
                inicfg.save(mainIni, "NHFL.ini")
            end
            if imgui.Button(u8'Чёрный', imgui.ImVec2(100, 30)) then
                ChangeTheme(5)
                inicfg.save(mainIni, "NHFL.ini")
            end
            imgui.SameLine()
            if imgui.Button(u8'Фиолетовый', imgui.ImVec2(100, 30)) then
                ChangeTheme(6)
                inicfg.save(mainIni, "NHFL.ini")
            end
            imgui.SameLine()
            if imgui.Button(u8'Черно-оранжевый', imgui.ImVec2(110, 30)) then
                ChangeTheme(7)
                inicfg.save(mainIni, "NHFL.ini")
            end
            imgui.SameLine()
            if imgui.Button(u8'Оранжевый', imgui.ImVec2(100, 30)) then
                ChangeTheme(8)
                inicfg.save(mainIni, "NHFL.ini")
            end
        end

вот код, но когда скрипт релогается или перезахожу то настройки слетают. почему?!