G.getfenv
From GMod Wiki
Function | |
Syntax |
getfenv( Function Affected Function : Integer Stack Level ) Where is this used? |
Description: | |
Returns what the given function sees as the global environment. By default this will be _G. | |
Returns: | Table The Environment |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.getfenv]G.getfenv [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- You can use a positive integer instead of a function for the 1st argument, this represents the stack level of the function to be affected. 1 is the current function, 2 is the function calling the current function, and so on.