A Wiki in the Desert
Log in

Module:LuaExample

From A Wiki in the Desert
Revision as of 23:36, 16 May 2021 by Omegaice (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:LuaExample/doc

local p = {} --p stands for package

function p.hello( frame )
    return "Hello, world! "..frame.args[1]
end

function p.hello_table(frame)
	local result = ""
	for k,v in pairs( frame.args ) do
		result = result .. ' ' .. k .. ' '.. v .. '\n'
	end
	return result
end

return p