Module:CommunosTestModule: Difference between revisions

From The First Descendant Wiki
No edit summary
No edit summary
Line 4: Line 4:
function p.test(frame)
function p.test(frame)
local amount = tonumber(frame.args["amount"])
local amount = tonumber(frame.args["amount"])
local parameter = frame.args["parameter"]
local values = frame.args["values"]
local i = 0
local tabs = {"<tabber>"}
local tabs = "<tabber>"
for i=1,amount do
while i<amount do
tabs[i+1] = "|-|Rank"
tabs = tabs.."|-|Rank"
tabs[i+2] = i
tabs = tabs..i
tabs[i+3] = "="
tabs = tabs.."="
tabs[i+4] = parameter[i]
tabs =tabs..parameter
i = i + 1
end
end
tabs = tabs.."</tabber>"
tabs[(i+4)*amount+1] = "</tabber>"
return frame:preprocess(tabs)
return frame:preprocess(table.concat(tabs))


end
end

Revision as of 00:23, 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"])
local values = frame.args["values"]
local tabs = {"<tabber>"}
for i=1,amount do
tabs[i+1] = "|-|Rank"
tabs[i+2] = i
tabs[i+3] = "="
tabs[i+4] = parameter[i]
end
tabs[(i+4)*amount+1] = "</tabber>"
return frame:preprocess(table.concat(tabs))

end


return p