A Wiki in the Desert
Log in

Difference between revisions of "Module:LuaExample"

From A Wiki in the Desert
 
(No difference)

Latest revision as of 23:36, 16 May 2021

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