lua-users home
lua-l archive

Re: collect Lua scripts in one script

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


> How can I read the Lua script and push the Lua functions into a nested table? 
Try this:
	function myload(s)
		_G[s]={}
		return assert(loadfile(s..".lua","bt",_G[s]))()
	end
Use as follows:
	myload"script1"
	myload"script2"

AltStyle によって変換されたページ (->オリジナル) /