From 3f94d76e53608cf7cc0a48faf9a0cccbb74a1eb3 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 29 Sep 2017 16:08:55 +0100 Subject: [PATCH] added nil check added nil check to create_description function --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 1f288d2..d829977 100644 --- a/init.lua +++ b/init.lua @@ -28,8 +28,8 @@ function toolranks.create_description(name, uses, level) local tooltype = toolranks.get_tool_type(description) local newdesc = toolranks.colors.green .. description .. "\n" .. - toolranks.colors.gold .. "Level " .. level .. " " .. tooltype .. "\n" .. - toolranks.colors.grey .. "Nodes dug: " .. uses + toolranks.colors.gold .. "Level " .. (level or 1) .. " " .. tooltype .. "\n" .. + toolranks.colors.grey .. "Nodes dug: " .. (uses or 0) return newdesc end