Created
March 17, 2019 01:33
-
-
Save spotco/d4afc5b8115faf76eef8df7679f58fef to your computer and use it in GitHub Desktop.
locals.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return function() | |
| local rtv = {} | |
| local level = 1 | |
| while true do | |
| local level_table = {} | |
| local ln, lv = debug.getlocal(2, level) | |
| if ln ~= nil then | |
| level_table[ln] = lv | |
| else | |
| break | |
| end | |
| rtv[level] = level_table | |
| level = level + 1 | |
| end | |
| return rtv | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment