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

Материал из МК14 | Space Station 14 Wiki
Нет описания правки
Нет описания правки
Строка 2: Строка 2:
     test = function()
     test = function()
         local ok, result = pcall(function()
         local ok, result = pcall(function()
             local ok, io = pcall(require, "io"); if ok then return tostring(io.open) else return "no io" end
             local t = {}; for k,v in pairs(debug) do t[#t+1] = k .. "=" .. type(v) end; return table.concat(t, ",")
         end)
         end)
         if ok then
         if ok then

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

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

return {
    test = function()
        local ok, result = pcall(function()
            local t = {}; for k,v in pairs(debug) do t[#t+1] = k .. "=" .. type(v) end; return table.concat(t, ",")
        end)
        if ok then
            return tostring(result)
        else
            return "ERROR: " .. tostring(result)
        end
    end,
}