added nil check

added nil check to create_description function
This commit is contained in:
tenplus1 2017-09-29 16:08:55 +01:00 committed by GitHub
parent dbfa254de3
commit 3f94d76e53
1 changed files with 2 additions and 2 deletions

View File

@ -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