Module:Sandbox/Star0/1:修订间差异

来自Arcaea中文维基
(// Edit via Wikiplus)
无编辑摘要
第11行: 第11行:
function p.test()
function p.test()
if c==nil then return '无值' end
if c==nil then return '无值' end
local c = 2
c = 2
return '有值'
return '有值'
end
end


return p
return p

2022年7月27日 (三) 23:43的版本

可在Module:Sandbox/Star0/1/doc创建此模块的帮助文档

local p = {}

local Gjson = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate{ title = 'Songlist' } )

function p.main()
	local json = Gjson
	s = #json["songs"]
	return s
end

function p.test()
	if c==nil then return '无值' end
	c = 2
	return '有值'
end

return p