View source for Module:Sports career
Appearance
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
local function isnotempty(s)
return s and s:match('%S')
end
function p.main(frame)
local player = {}
local coach = {}
local pargs = frame:getParent().args
local tracking = ''
local iargs = {}
local pmax = tonumber(frame.args['pmax'] or '40') or 40
local cmax = tonumber(frame.args['cmax'] or '30') or 30
for k,v in pairs(pargs) do
if type(k) == 'string' and isnotempty(v) then
if k:match('^team%d+$') then
local num = mw.ustring.gsub(k,'^team(%d+)$','%1')
table.insert(player, {tonumber(num) or 0, pargs['years' .. num] or '', v})
elseif k:match('^cteam%d+$') then
local num = mw.ustring.gsub(k,'^cteam(%d+)$','%1')
table.insert(coach, {tonumber(num) or 0, pargs['cyears' .. num] or '', v})
000
1:0
Template used on this page:
Return to Module:Sports career.