영어 위키백과>DannyS712 m (Protected "Module:No globals": Highly visible template: Redundant to current transclusion on a cascading protected page, but better safe than sorry ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
m (판 15개를 가져왔습니다: 영어 위키백과에서 가져옴) |
||
(사용자 3명의 중간 판 4개는 보이지 않습니다) | |||
2번째 줄: | 2번째 줄: | ||
function mt.__index (t, k) | function mt.__index (t, k) | ||
if k ~= 'arg' then | if k ~= 'arg' then | ||
error('Tried to read nil global ' .. tostring(k), 2) | |||
error | |||
end | end | ||
return nil | return nil | ||
9번째 줄: | 8번째 줄: | ||
function mt.__newindex(t, k, v) | function mt.__newindex(t, k, v) | ||
if k ~= 'arg' then | if k ~= 'arg' then | ||
error | error('Tried to write global ' .. tostring(k), 2) | ||
end | end | ||
rawset(t, k, v) | rawset(t, k, v) | ||
end | end | ||
setmetatable(_G, mt) | setmetatable(_G, mt) |
2021년 12월 28일 (화) 16:20 기준 최신판
• 현재 페이지 URL 줄이기