今天是2024年10月6日 第40周 星期日
代人,时大变了。
我们生活在大地上,但我们的梦想超越天空。
變更
跳至導覽
跳至搜尋
← 較舊編輯
較新編輯 →
模块:No globals
(檢視原始碼)
於 2020年6月1日 (一) 08:55 的修訂
移除 141 位元組
、
2020年6月1日 (一) 08:55
小
导入1个版本:受托导入数个模板;本次导入Infobox,来源为ZhWP
行 2:
行 2:
function mt.__index (t, k)
function mt.__index (t, k)
if k ~= 'arg' then
if k ~= 'arg' then
−
-- perf optimization here and below: do not load Module:TNT unless there is an
error
+
error('
尝试读取空全局变量:
' .
.
tostring(k), 2)
−
error(require
('
Module:TNT
'
)
.
format('I18n/No globals', 'err-read',
tostring(k
)
), 2)
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
(require
('
Module:TNT
'
)
.
format('I18n/No globals', 'err-write',
tostring(k
)
), 2)
+
error('
尝试写入全局变量:
' .
.
tostring(k), 2)
end
end
rawset(t, k, v)
rawset(t, k, v)
end
end
setmetatable(_G, mt)
setmetatable(_G, mt)
One-Six
161
次編輯
導覽選單
個人工具
建立帳號
登入
命名空間
模組
討論
變體
視圖
閱讀
檢視原始碼
檢視歷史
更多
搜尋
導覽
首頁
近期變更
隨機頁面
沙盒
互助客棧
QQ交流群
方針與指引
工具
上傳檔案
特殊頁面
可列印版