Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:Core
(view source)
Revision as of 14:19, 25 April 2021
251 bytes added
,
3 years ago
no edit summary
Line 325:
Line 325:
local success, data = pcall(function () return require(string.format("Module:%s", name)) end)
local success, data = pcall(function () return require(string.format("Module:%s", name)) end)
-- module without return (or empty, nil, false, true return) gives success = true, data = true
-- module without return (or empty, nil, false, true return) gives success = true, data = true
+
if data == true then
+
return false, nil
+
else
+
return success, data
+
end
+
end
+
+
function Utils.loadData(name)
+
local success, data = pcall(function () return mw.loadData(string.format("Module:%s", name)) end)
+
-- TODO: ???
if data == true then
if data == true then
return false, nil
return false, nil
がか
cssedit, gkautomate
7,064
edits