Module:Sandbox/Hellknowz/Test

This is an old revision of this page, as edited by Hellknowz (talk | contribs) at 12:32, 27 August 2013 (test args). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local main = {};
 
function main.hello(frame)

    local args = frame.args
    local arg1 = args[0]
    local arg2 = args[1]
    local arg3 = args[2]

    local s = 'Params: '
    if (arg1 ~= nil) then s = s .. '1 = ' .. arg1 end
    if (arg2 ~= nil) then s = s .. '; 2 = ' .. arg2 end
    if (arg3 ~= nil) then s = s .. '; 3 = ' .. arg3 end
    return s

end
 
return main;