Modul:No globals

Aus Kryptowiki - Die freie Enzyklopädie der Kryptowährungen
Wechseln zu: Navigation, Suche

Die Dokumentation für dieses Modul kann unter Modul:No globals/Doku erstellt werden

local mt = getmetatable(_G) or {}
function mt.__index (t, k)
	if k ~= 'arg' then
		error('Tried to read nil global ' .. tostring(k), 2)
	end
	return nil
end
function mt.__newindex(t, k, v)
	if k ~= 'arg' then
		error('Tried to write global ' .. tostring(k), 2)
	end
	rawset(t, k, v)
end
setmetatable(_G, mt)

Spenden-Adressen:
Bitcoin Icon BTC: 1EoecgUZnAjamUYaKstqwbremQqbucTaoZ
Ethereum Icon ETH: 0x0D2Ab63dfe70a7fA12f9d66eCfEA9dDc8F5173A8
XEM Icon XEM: NBZPMU-XES6ST-ITEBR3-IHAPTR-APGI3Y-RAAMHV-VZFJ
Verge Icon XVG: DGYmzxoe3ryK6MnsR13GqR9r1NThpxPcKs