Re: collect Lua scripts in one script
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: collect Lua scripts in one script
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2012年12月29日 17:21:11 -0200
> 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"