diff --git a/LuaMenu/widgets/gui_modoptions_panel.lua b/LuaMenu/widgets/gui_modoptions_panel.lua index 724535e8b..eeea19a17 100644 --- a/LuaMenu/widgets/gui_modoptions_panel.lua +++ b/LuaMenu/widgets/gui_modoptions_panel.lua @@ -425,7 +425,7 @@ local function CreateModoptionWindow() modoptionsSelectionWindow:Dispose() end - local buttonAccept + local buttonAccept, buttonReset local function AcceptFunc() screen0:FocusControl(buttonAccept) -- Defocus the text entry @@ -536,9 +536,8 @@ local function InitializeModoptionsDisplay() local function OnSetModOptions(listener, modopts) local text = "" local empty = true - modoptions = modoptions or {} - modopts = modopts or {} - for key, value in pairs(modopts) do + modoptions = modopts or {} + for key, value in pairs(modoptions) do if modoptionDefaults[key] == nil or modoptionDefaults[key] ~= value or key == "ranked_game" then local option = getModOptionByKey(key) local name = option.name and option.name or key