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 00:43, 22 March 2013 (test finding crit parameters). 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 args = frame.args;

    if args[1] == nil then
        local parent = frame:getParent();
        args = parent.args;
    end
    
    for k,v in pairs(args) do
        if k == "crit[%d]+" then
            return k
        else
            return "didn't work"
        end
    end    
    
--[[
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