Module:Sandbox/Erutuon/random

From blackwiki
< Module:Sandbox‎ | Erutuon
Revision as of 01:02, 8 October 2016 by blackwiki>Erutuon (namespace function)
Jump to navigation Jump to search

Test

  • Script error: The function "show" does not exist.



local p = {}

function p.test(frame)
	local word = frame.args[1] == "print" and "Printing is allowed"
	return word
end

function p.currentFrame(frame)
	currentFrame = mw.getCurrentFrame(frame)
	local frameTable = {}
	for k, v in pairs(currentFrame) do
		frameTable[k] = v
	end
	return frameTable and table.concat(frameTable, ", ") or "nil"
end

function p.namespace(frame)
	return frame:getParent():getTitle()
end

return p