FANDOM


local p = {}
 
function p.main(frame)
    local id = frame.args['id']
 
    -- use first argument as fallback
    if id==nil then
        id = frame.args[1]
 
        if id==nil then
            return ''
        end
    end
 
    local length = frame.args['length']
 
    -- use second argument as fallback
    if length==nil then
        length = frame.args[2]
 
        if length==nil then
            length = 0
        end
    end
 
    local nums = ''
    for i=1, length, 1 do
        -- the surplus comma should simply be ignored by the frame sequence script
        nums = nums .. i .. ','
    end
 
    return '{{Frame sequence|id=' .. id .. '|sequence=' .. nums .. '}}'
end
 
return p