Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
Pazyryk submitted a new resource:
Lua Environment and Sandboxing - Lua Environment and Sandboxing
Read more about this resource...
Lua Environment and Sandboxing - Lua Environment and Sandboxing
There's a variable in Lua called "_G" that represents the environment. It's a table that contains all of the global variables by name and their values. Keep in mind that things like "print", "ipairs", "GameInfo" and "_G" itself are just ordinary Lua variable names that happen to be globals pointing to functions or tables. You can easily reassign those variable names with any value you like (including nil) either globally or within some scope. For example, you could add [FONT="Courier...
Read more about this resource...
Last edited by a moderator: