aboutsummaryrefslogtreecommitdiff
path: root/gamemode/inventorysystem
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-05-07 13:47:40 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-05-07 13:47:40 -0400
commit9e0537b0aa417e88a6a61238484ddcef74080ae0 (patch)
treee2bd590ec3de41d384aa5f6206b14e1a73647846 /gamemode/inventorysystem
parent191ba416c8b611ea4901cead138789a357c56134 (diff)
downloadartery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.gz
artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.bz2
artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.zip
Added tons of stuff
Diffstat (limited to 'gamemode/inventorysystem')
-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