Module:Sports table/WDL: Difference between revisions

Content deleted Content added
should fix latest error
Line 289:
end
local win_perc = ''
--Some sports use draw as well
local ppg = ''
local win_perc = mm._precision_format((2*wins + draws) / (2*matches), 3)
if tonumber(matches) == nil or matches == 0 then
local ppg = mm._precision_format(points / matches, 2)
if matches == 0 then
-- Escape for zero matches
win_perc = '—'
ppg = '—'
else
elseif losses > 0 or draws > 0 then
--Some sports use draw as well
-- Drop the leading zero (from the string)
win_perc = stringmm.sub_precision_format((win_perc,2,string.len*wins + draws) / (win_perc2*matches), 3)
local win_perc ppg = mm._precision_format((2*wins + draws)points / (2*matches), 32)
elseif if losses > 0 or draws > 0 then
-- Drop the leading zero (from the string)
win_perc = string.sub(win_perc,2,string.len(win_perc))
end
end
if ranking_style=='wperc' or ranking_style=='win percentage' or ranking_style=='wpct' then