Module:TestMod

From Hazeron Wiki
Revision as of 10:17, 18 April 2024 by Celarious (talk | contribs) (testing)
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 = {}
    while args[i] do i = i + 1 end
    return "You entered " .. i .. " arguments."
end

return p