舰R百科是靠无数自愿编辑者持续地建设更新完善的。编辑非常简单,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

模块:台词

来自舰R百科
SegFault留言 | 贡献2016年10月18日 (二) 02:41的版本 (创建页面,内容为“local ships = mw.loadData("模块:特殊数据").ships return function(frame) local shipName = frame.args[1] local dialogue = frame.args[2] local force...”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到导航 跳转到搜索
{{#invoke:台词|获得|胡德}}

Lua错误 在模块:特殊数据的第3行:attempt to index local 'data' (a boolean value)

{{#invoke:台词|MVP|胡德}}

Lua错误 在模块:特殊数据的第3行:attempt to index local 'data' (a boolean value)


local ships = mw.loadData("模块:特殊数据").ships

return function(frame)
    local shipName = frame.args[1]
    local dialogue = frame.args[2]
    local force = frame.args[3]
    if force ~= nil and force ~= '' then return force end
    local ship = ships[shipName]
    if ship == nil then return '' end
    local ret = ship[dialogue]
    if ret == nil then return '' end
    return ret
end