Jump to content

Module:Ash LuaInternal

Unchecked
From Wikipedia

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

local p = {}
 
function p.internal(msg, frame)
	-- Returns a message with a signature
	local args = frame:getParent().args
	local repet = tonumber(args[2])
		
	if (tonumber(args[2]) < 0) then
		error("Le second argument ne doit pas être négatif")
	elseif (repet > 10) then
		error("Trop de répétitions")
	else
		local result = {}
		for iter = 1, repet do
			table.insert(result, '* ' .. msg ..  args[1] .. args[2] .. ' ! <br />\n:' .. args.bar .. ' & ' .. args.baz)
		end
		return table.concat(result, '\n')
	end
end
return p