Jump to content

Module:Csdcheck

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius on tour (talk | contribs) at 03:28, 22 March 2013 (syntax fix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

function p.check(frame)
    local result = "Arguments: "
    for k,v in pairs(frame.args) do
        if mw.ustring.match(k,"^crit[1-9]%d*$") then
            result = result .. k .. ", "
        end
    end
    return result
--[[
local result = nil
    for i,v in ipairs(args) do
        local crit = {"G1","G2","G3","G4"}
        for x,y in ipairs(crit) do
            if v == y then
                result = "yes";
            end
        end
    end
    return result
--]]
end

return p