Module:OnshokoeseScript: Difference between revisions

From Constructed Worlds Wiki
Jump to navigation Jump to search
(Replaced content with "local p = {"test"} return p")
Tag: Replaced
(Undo revision 466282 by Kids112 (talk))
Tag: Undo
Line 1: Line 1:
local p = {"test"}
local p = {} -- Defines a variable p as an empty table, but *not* nil.
 
function p.main( frame ) -- This block defines the table element p["main"] as a function.
    return "Hello world" -- The string result of the function.
end -- Ends the block defining the function object p["main"] (or p.main).
 
return p
return p

Revision as of 22:34, 25 April 2024

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

local p = {} -- Defines a variable p as an empty table, but *not* nil.

function p.main( frame ) -- This block defines the table element p["main"] as a function.
    return "Hello world" -- The string result of the function.
end -- Ends the block defining the function object p["main"] (or p.main).

return p