Module:AshLuaInternal

From Wikipedia

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

local p = {}

function p.internal(frame, msg)
	local args = frame:getParent().args
	local repet = tonumber(args[2])
	
	if repet < 0 then
		error('Nombre de répétitions négatif')
	elseif repet > 10 then
		error('Nombre de répétitions trop élevé')
	else
		local result = ''
		for i = 1, repet do
			 result = result ..  '# ' .. msg	.. args[1] .. '!'
			 .. args.baz .. ' et ' .. args.bar .. '\n'
		end
		return	result
	end
	
end

return p