aboutsummaryrefslogtreecommitdiff
path: root/gamemode/inventorysystem/cl_common.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/inventorysystem/cl_common.lua')
-rw-r--r--gamemode/inventorysystem/cl_common.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/gamemode/inventorysystem/cl_common.lua b/gamemode/inventorysystem/cl_common.lua
index 15f67b4..5b461d3 100644
--- a/gamemode/inventorysystem/cl_common.lua
+++ b/gamemode/inventorysystem/cl_common.lua
@@ -8,9 +8,11 @@ function com.CreateMenuFor(menu, tbl)
for k,v in pairs(tbl) do
if isfunction(v) then --This is a dead-end, add the menu
menu:AddOption(k,v)
- else --Otherwise it should be a table, recursively call to create
+ elseif istable(v) then --Otherwise it should be a table, recursively call to create
local submenu = menu:AddSubMenu(k)
CreateMenuFor(submenu,v)
+ else
+ error("I got wanted to make a menu for something not a function or a table:" + type(v))
end
end
end