No edit summary |
No edit summary Tag: Manual revert |
||
| (11 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
function p.test(frame) | function p.test(frame) | ||
local amount = tonumber(frame.args["amount"]) | local amount = tonumber(frame.args["amount"]) * 5 | ||
local values = frame.args["values"] | local values = frame.args["values"] | ||
local tabs = {"<tabber>"} | local tabs = {"<tabber>"} | ||
local i = 1 | local i = 1 | ||
for i=1,amount do | for i=1,amount,4 do | ||
tabs[i+1] = "|-|Rank" | tabs[i+1] = "|-|Rank" | ||
tabs[i+2] = i | tabs[i+2] = i | ||
| Line 13: | Line 13: | ||
tabs[i+4] = values[i] | tabs[i+4] = values[i] | ||
end | end | ||
tabs[# | tabs[#tabs+1] = "</tabber>" | ||
return frame:preprocess(table.concat(tabs)) | --return frame:preprocess(table.concat(tabs)) | ||
return values[1] | |||
end | end | ||
return p | return p | ||
Latest revision as of 00:36, 4 June 2024
Documentation for this module may be created at Module:CommunosTestModule/doc
local p = {}
local tab_amount = 5
function p.test(frame)
local amount = tonumber(frame.args["amount"]) * 5
local values = frame.args["values"]
local tabs = {"<tabber>"}
local i = 1
for i=1,amount,4 do
tabs[i+1] = "|-|Rank"
tabs[i+2] = i
tabs[i+3] = "="
tabs[i+4] = values[i]
end
tabs[#tabs+1] = "</tabber>"
--return frame:preprocess(table.concat(tabs))
return values[1]
end
return p