Content deleted Content added
No edit summary |
No edit summary |
||
Line 14:
local total1, total2 = 0, 0
for parameter in mw.text.gsplit( lines[#lines], ';' ) do
if string.find( parameter, '^ *%A' ) then
if i == 6 then
total1 = tonumber( string.gsub( parameter, '%D', '' ) )
if not total1 then
total1 = 0
end
return parameter, total1
elseif i == 8 then
total2 = tonumber( string.gsub( parameter, '%D', '' ) )
if not total2 then
total2 = 0
end
break
end
i = i + 1
end
end
divisor = math.max( total1, total2 ) / ( 0.95 * barwidth )
end
return divisor
|