×
Create a new article
Write your page title here:
We currently have 179 articles on NBITTRPG Wiki. Type your article name above or click on one of the titles below and start writing!



NBITTRPG Wiki

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

-- <nowiki>
--------------------------------------------------------------------------------
-- A less intimidating version of the built-in "error()" function, to help
-- editors fix their mistakes when transcluding a template.
--------------------------------------------------------------------------------
local checkType = require('libraryUtil').checkType

return function (message, ...)
    checkType('Module:User error', 1, message, 'string')

    local element = mw.html.create('strong')
        :addClass('error')
        :wikitext('Error: ' .. message .. '.')

    for i = 1, select('#', ...) do
        local category = select(i, ...)

        checkType('Module:User error', i + 1, category, 'string')

        if category ~= '' then
            element:wikitext('[[Category:' .. category .. ']]')
        end
    end

    return tostring(element)
end

-- </nowiki>
-- (Add categories here.)

Recent changes

  • Zaptrap • Friday at 22:20
  • Zaptrap • Friday at 22:18
  • Zaptrap • Friday at 22:15
  • Ember • Friday at 22:03
  • AndrewFBR • Friday at 00:24
  • AndrewFBR • Friday at 00:24
  • AndrewFBR • Friday at 00:24
  • AndrewFBR • Friday at 00:24