Module:Slottable: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 43:
-- else
-- row:tag('td'):wikitext(item.speed):done()
-- end
-- if item.speed == nil or (tonumber(item.speed) and tonumber(item.speed) < 0) then
-- -- proceed with your existing code
-- row:tag('td'):addClass('table-na nohighlight'):css('text-align', 'center'):wikitext('<small>N/A</small>')
-- else
-- if not tonumber(item.speed) then
-- error('Invalid speed format for item: ' .. item.name .. ' (Speed: ' .. tostring(item.speed) .. ')')
-- end
-- row:tag('td'):wikitext(item.speed):done()
-- end
if item.speed == nil or (tonumber(item.speed) and tonumber(item.speed) < 0) then
Line 49 ⟶ 58:
else
if not tonumber(item.speed) then
row:tag('td'):wikitext('Not number'):done()
error('Invalid speed format for item: ' .. item.name .. ' (Speed: ' .. tostring(item.speed) .. ')')
else
row:tag('td'):wikitext(item.speed):done()
end
row:tag('td'):wikitext(item.speed):done()
end
end

Navigation menu