Help:Lua

Wowpedia has the Scribunto extension enabled, which allows us to implement complex templates using Lua, rather than wiki markup.

Implemented modules are listed at Special:PrefixIndex/Module:

External help:
 * Lua on Wikipedia
 * Scribunto Lua reference manual

Examples
The canonical example of a Scribunto template is Module:Bananas. Call it with. This template takes no parameters and calls the function hello which prints back "Hello, world!", as seen here:

A more complex example is implemented in Module:BananasArgs, demonstrating basic argument handling. The various function outputs are listed here in the order they appear in the module:

Pointers

 * print is not allowed. The only way to actually display anything is to return it back to the wiki.
 * To provide functions, create a table and attach methods to it -- see Module:Bananas and Module:BananasArgs as examples. That table must be returned to the wiki to expose the functions to editors.
 * Note the differences from standard Lua.