diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-05-07 13:47:40 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-05-07 13:47:40 -0400 |
| commit | 9e0537b0aa417e88a6a61238484ddcef74080ae0 (patch) | |
| tree | e2bd590ec3de41d384aa5f6206b14e1a73647846 /gamemode/inventorysystem/cl_common.lua | |
| parent | 191ba416c8b611ea4901cead138789a357c56134 (diff) | |
| download | artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.gz artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.bz2 artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.zip | |
Added tons of stuff
Diffstat (limited to 'gamemode/inventorysystem/cl_common.lua')
| -rw-r--r-- | gamemode/inventorysystem/cl_common.lua | 4 |
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 |
