lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I would like to call the OnEvent() function of all loaded modules at a
> given time.

for k,v in pairs(_G) do
	if type(v)=="table" and type(v.OnEvent)=="function" then
		v.OnEvent()
	end
end

Change _G to something else if can keep track of all loaded modules.