Parameters
Returns
void
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
debug.setsafeenv(func: function, env: table): ()
| Parameter | Type | Description |
|---|---|---|
func | function | The target function to modify. |
env | table | The environment table to set. |
void
local function test() end
debug.setsafeenv(test, { myGlobal = 123 })
-- Function environment is now locked to this table
debug.setsafeenv(test, getgenv())