From 9e0537b0aa417e88a6a61238484ddcef74080ae0 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sun, 7 May 2017 13:47:40 -0400 Subject: Added tons of stuff --- gamemode/inventorysystem/cl_common.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gamemode/inventorysystem/cl_common.lua') 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 -- cgit v1.2.3-70-g09d2