Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 20/08/2016
- --Last update: 20/08/2016
- --[[ Notes:
- Does:
- Retorna a tabela da string inserida
- Args:
- s --> String com o nome da tabela
- Example:
- str = "a.b.c"
- a={b={c=1}}
- print(system.loadTable(str))
- ]]--
- system = {}
- system.loadTable = function(s)
- local list
- for tbl in s:gmatch("[^%.]+") do
- tbl = tonumber(tbl) and tonumber(tbl) or tbl
- list = (list and list[tbl] or _G[tbl])
- end
- return list
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement