Jump to content

User:Codemini/Lua Tutorial/Getting started

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Codemini (talk | contribs) at 15:21, 26 May 2025 (Getting started with Lua). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Getting started

On a Wiki with Scribtuno enabled, create a page with a title starting with Module:, for example "Module:Example". Into this new page, copy the following texts:

local p = {} -- p stands as the package name

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

return p

Save that, then on another non-module page, as on a sandbox page, write:

{{#invoke:Example|hello}}

which will return the text: Hello, world!.

Previous Next