Модуль:IanComradeBot/ftl/ru-RU.json/data: различия между версиями
Pok (обсуждение | вклад) Новая страница: «local title = mw.title.new("User:IanComradeBot/ftl/ru-RU.json", "User") local content = title and title:getContent() or "" local success, data = pcall(mw.text.jsonDecode, content) if not success or type(data) ~= "table" then data = {} end return data» |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 1: | Строка 1: | ||
local title = mw.title.new(" | local title = mw.title.new("Участник:IanComradeBot/prototypes/accent.json") | ||
local | local jsonData = title and title:getContent() or "" | ||
local success, data = pcall(mw.text.jsonDecode, jsonData) | |||
local success, data = pcall(mw.text.jsonDecode, | return (success and type(data) == "table") and data or {} | ||