Module:Sandbox: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
mNo edit summary
(Replaced content with "local p = {} function p.hello( frame ) return "Hello, world!" end return p")
Tag: Replaced
 
(10 intermediate revisions by 2 users not shown)
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

Latest revision as of 17:40, March 6, 2021

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

return p