Module:Abilities/utils: Difference between revisions

Jump to navigation Jump to search
LVL (talk | contribs)
No edit summary
m Ensure value is number when checking value > 0
Line 51: Line 51:
end
end
-- ONLY add a '+' if the value is positive AND there isn't already a prefix.
-- ONLY add a '+' if the value is positive AND there isn't already a prefix.
elseif (value > 0 and prefix == '') then
elseif (type(value) == 'number' and value > 0 and prefix == '') then
prefix = '+'
prefix = '+'
end
end