setfenv
Definition
-- @/=[C]:-1
function setfenv(...)
Callers
@/lua/vehicle/electricsCustomValueParser.lua
--pwm function needs access to a global time variable, hence it also gets a custom environment
setfenv(customElectricsEnv.pwm, pwmEnv)
@/lua/common/libs/lua-luaepnf/epnf.lua
if V == " 5.1" then
setfenv( func, env )
end
@/lua/ge/extensions/gameplay/rally/notebook/pacenote.lua
-- Function compiled successfully, now execute it safely
setfenv(func, context)
local status, result = pcall(func, context)
@/lua/common/libs/LuLPeg/lulpeg.lua
if env then
setfenv (fun, env)
end
@/lua/ge/extensions/editor/api/gui.lua
if func then
setfenv(func, {})
return func()
@/lua/common/libs/resty/template.lua
local func = assert(loadstring(view))
setfenv(func, setmetatable({ template = template }, context))
return func