summaryrefslogtreecommitdiff
path: root/server/src/global_protect.lua
blob: 6c736ea6f2743cfff73eec5b6455975ac3cc689f (plain)
1
2
3
4
5
6
7
8
9
10
local mt = {}
setmetatable(_G, mt)

function mt:__index(k)
    error(('读取不存在的全局变量[%s]'):format(k), 2)
end

function mt:__newindex(k, v)
    error(('保存全局变量[%s] = [%s]'):format(k, v), 2)
end