diff options
Diffstat (limited to 'gamemode/core')
| -rw-r--r-- | gamemode/core/inventory/item.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gamemode/core/inventory/item.lua b/gamemode/core/inventory/item.lua index a13efa9..a598fc2 100644 --- a/gamemode/core/inventory/item.lua +++ b/gamemode/core/inventory/item.lua @@ -39,6 +39,7 @@ function itm.RegisterItem(tbl) end function itm.GetItemByName(name) + assert(type(name) == "string",string.format("Attempted to get an item by name with a %s.")) assert(items[name] ~= nil,string.format("Attempted to get item with invalid name %q Valid item names are:\n\t%s",name,table.concat(table.GetKeys(items),"\n\t"))) local item if items[name].init then |
