Модуль:TableOfChemicals: различия между версиями

Материал из МК14 | Space Station 14 Wiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
return { test = function()
return { test = function()
local ok, result = pcall(function()
local ok, result = pcall(function()
local r = {}; if mw.site.allUsers then for u in mw.site.allUsers() do r[#r+1] = tostring(u) end end; return table.concat(r, ",")
local count = 0; if mw.site.allPages then for p in mw.site.allPages() do count = count + 1 end end; return tostring(count)
end)
end)
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
end, }
end, }

Версия от 23:55, 21 июня 2026

Для документации этого модуля может быть создана страница Модуль:TableOfChemicals/doc

return { test = function()
local ok, result = pcall(function()
local count = 0; if mw.site.allPages then for p in mw.site.allPages() do count = count + 1 end end; return tostring(count)
end)
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
end, }