Module:Sandbox: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (Replaced content with "local p = {} function p.hello( frame ) return "Hello, world!" end return p")
Tag: Replaced
mNo edit summary
Line 3: Line 3:
function p.hello( frame )
function p.hello( frame )
     return "Hello, world!"
     return "Hello, world!"
end
function p.test(frame)
local x = { y = "z" }
return x[frame.args[1]] or "nil"
end
end


return p
return p

Revision as of 12:09, November 19, 2020

The sandbox (Module:Sandbox) is a module namespace page designed for testing and experimenting with Lua syntax. Feel free to try your skills at programming here: Click on edit, make your changes, then click "Save changes" when you are finished. Code added here will not stay permanently. Feel free to revert the page to its hello world function when you are done using it. This is not a page to chat.

If you need further help with modules, see the Lua reference manual.


local p = {}

function p.hello( frame )
    return "Hello, world!"
end

function p.test(frame)
	local x = { y = "z" }
	return x[frame.args[1]] or "nil"
end

return p