Anonymous

Module:Calculator/Summoning Interval Efficiency: Difference between revisions

From Melvor Idle
m
Check if the table value is a number based on tonumber
m (Round where data is formatted for output instead)
m (Check if the table value is a number based on tonumber)
Line 53: Line 53:
     row:tag("th"):wikitext(header)
     row:tag("th"):wikitext(header)


    if type(value) == "number" and value < 0 then
local numValue = tonumber(value)
    if numValue and numValue < 0 then
         cell:css('color', 'red'):wikitext(value)
         cell:css('color', 'red'):wikitext(value)
     else
     else
2,875

edits