Module:TestMod: Difference between revisions
Jump to navigation
Jump to search
m (arg 1?) |
(arg1?) |
||
Line 3: | Line 3: | ||
function p.hello( frame ) | function p.hello( frame ) | ||
local args = frame.args | local args = frame.args | ||
return "This should have printed the first argument you entered: " .. args | return "This should have printed the first argument you entered: " .. args(1) | ||
end | end | ||
return p | return p |
Revision as of 15:03, 17 April 2024
Basic test Lua module, can be invoked with {{#invoke: TestMod|FunctionName|arg1|arg2|etc ...}}
local p = {} --p stands for package function p.hello( frame ) local args = frame.args return "This should have printed the first argument you entered: " .. args(1) end return p