From 9ba957b99603590b099f4bcd22a9cc86525dbcde Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 2 Sep 2017 17:34:27 -0400 Subject: Various debugging things --- gamemode/core/inventory/item.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'gamemode/core') 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 -- cgit v1.2.3-70-g09d2