Difference between revisions of "Module:Sandbox"

From blackwiki
Jump to navigation Jump to search
blackwiki>BigGreenCahuna
blackwiki>BigGreenCahuna
Line 9: Line 9:
 
if args[1] == "1"
 
if args[1] == "1"
 
then  
 
then  
Message = "Cahuna"   
+
Message = "Bill"   
 
     else   
 
     else   
 
Message = args[1]
 
Message = args[1]

Revision as of 04:58, 11 August 2014

Scribunto Testing Area

This is not an actual Lua module. It exists to provide a convenient pseudo-namespace for code testing, hopefully preventing the main Module: namespace from becoming littered with experiments, as Lua modules cannot exist as subpages in the User: namespace.

Please name your experimental modules in the following format to help keep things tidy:

Module:Sandbox/Your User Name/Module name

You can use Special:PrefixIndex/Module:Sandbox to list modules in this area.



-- Placeholder only! Do not add code.
-- Reviving the evil Banana test
local p = {}
 
function p.hello( frame )
	local args=frame.args
	local Message = "Minions love bananas!"

	if args[1] == "1"
	then 
		Message = "Bill"  
    else  
		Message = args[1]
	end
    return '<div>Bob</div>'   
end
 
return p