Skip to content

Commit

Permalink
Fix error when gamemode has no valid settings (#1643)
Browse files Browse the repository at this point in the history
Fixes error: [MENU ERROR] lua/menu/mainmenu.lua:185: bad argument #1 to 'pairs' (table expected, got string)
  • Loading branch information
ceifa committed Mar 26, 2020
1 parent fbe5425 commit 5729386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion garrysmod/lua/menu/mainmenu.lua
Expand Up @@ -178,7 +178,7 @@ function UpdateServerSettings()

local Settings = util.KeyValuesToTable( settings_file )

if ( Settings.settings ) then
if ( istable( Settings.settings ) ) then

array.settings = Settings.settings

Expand Down

0 comments on commit 5729386

Please sign in to comment.