「モジュール:Pococha」の版間の差分
編集の要約なし |
編集の要約なし |
||
| 15行目: | 15行目: | ||
dataStore['Pocochaアカウント'] = t_name | dataStore['Pocochaアカウント'] = t_name | ||
local result = mw.smw.set | local ok, result = pcall(mw.smw.set, dataStore ) | ||
if result | if not ok then | ||
return '<span class="error">SMW Lua error: ' .. tostring(result) .. '</span>' | |||
end | |||
if result ~= true then | |||
-- error message to be found in result.error | -- error message to be found in result.error | ||
return '<span class="error">SMW set error: ' .. tostring(result.error) .. '</span>' | |||
end | end | ||
end | end | ||