Site Notice
hello, world
Difference between revisions of "Module:Variable"
From Project-EPB Commons
([InPageEdit] 没有编辑摘要) |
([InPageEdit] 没有编辑摘要) |
||
Line 3: | Line 3: | ||
_G.variable = _G.variable or 1 | _G.variable = _G.variable or 1 | ||
− | function p.main() | + | function p.main(frame) |
local n = _G.variable | local n = _G.variable | ||
− | _G.variable = _G.variable + 1 | + | _G.variable = frame:getTitle() .. _G.variable + 1 |
return n | return n | ||
end | end | ||
return p | return p |
Revision as of 02:08, 29 October 2020
{{#invoke:variable|main}}{{#invoke:variable|main}}{{#invoke:variable|main}}
1 1 1
local p = {}
_G.variable = _G.variable or 1
function p.main(frame)
local n = _G.variable
_G.variable = frame:getTitle() .. _G.variable + 1
return n
end
return p