Module:TestMod

From Hazeron Wiki
Jump to navigation Jump to search

Basic test Lua module, can be invoked with {{#invoke: TestMod|FunctionName|arg1|arg2|etc ...}}


local p = {} --p stands for package

function p.countArgs( frame )
    local args = frame.args
    local i = 1
    while args[i] do i = i + 1 end
    return "You entered " .. i - 1 .. " arguments."
end

return p