Lore archive · Warcraft Wiki, 2023 dump
API getfenv
Last wiki revision 2023-04-29
Returns the current environment in use by the function. env = getfenv(f)
- f: or - A function to retrieve the environment of, or a numeric level of a function on the call stack starting from 1.
- env: - The environment assigned to the function.
- If the environment of a function has a metatable applied with the field set, this function will instead return the value assigned to that key.
- This function always returns nil if called inside a finalizer.
Source
https://warcraft.wiki.gg/wiki/API_getfenv · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.