Content deleted Content added
Come on, a module usedo n 200,000 pages and in system messages is clearly not alpha |
Rv; this is the English Wikipedia, not the Turkish Wikipedia |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 4:
== Usage ==
<syntaxhighlight lang="lua">
local protect = require('Module:Protect')
local protectedFunc =
</syntaxhighlight>
=== Arguments ===
Line 26:
== Example ==
<syntaxhighlight lang="lua">
local protect = require('Module:Protect')
▲ function p.main(frame)
▲ if not frame.args[1] then
▲ error('missing argument')
▲ return frame.args[1]
▲ end
▲ p.main = '''protect'''(p.main)
return p▼
</syntaxhighlight>
Invoking the main function without arguments will output: <strong class="error">Error: missing argument</strong>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
|