Module:LuaTest: Difference between revisions

From FHX Wiki
(Created page with "local p = {} -- p stands for package function p.hello( frame ) return "Hello, world!" end return p")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
-- https://www.mediawiki.org/wiki/Lua/Tutorial
-- https://www.mediawiki.org/wiki/Lua/Scripting
-- Usage: {{#invoke:LuaTest|hello}}
local p = {} -- p stands for package
local p = {} -- p stands for package
function p.hello( frame )
function p.hello( frame )

Latest revision as of 13:42, 30 June 2024

Documentation for this module may be created at Module:LuaTest/doc

-- https://www.mediawiki.org/wiki/Lua/Tutorial
-- https://www.mediawiki.org/wiki/Lua/Scripting
-- Usage: {{#invoke:LuaTest|hello}}
local p = {} -- p stands for package
function p.hello( frame )
    return "Hello, world!"
end

return p