function init_global_protection()
-- Catch global accesses
local locked_globals_mt = {
- __index = function (t, k) log("warn", "%s", debug.traceback("Attempt to read a non-existent global '"..k.."'", 2)); end;
+ __index = function (t, k) log("warn", "%s", debug.traceback("Attempt to read a non-existent global '"..tostring(k).."'", 2)); end;
__newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end;
};