Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What does getfenv() do if you add the function argument?

Asked by
funyun 958 Moderation Voter
9 years ago
a = 1
b = 2
c = 3

function hi()
    print("hi")
end

print(getfenv(hi) == getfenv())

And that prints "true". So, how would I use getfenv with a function, and why would I do that?

Answer this question