« Module:No globals/doc » : différence entre les versions

De La documentation de La Raffinerie
Aller à :navigation, rechercher
m (Reverted edits by 2601:901:8100:4660:4505:ADD1:108D:300C (talk) (HG) (3.4.10))
 
m (1 version importée)
 
(Aucune différence)

Dernière version du 16 juillet 2022 à 14:19

<templatestyles src="Module:Message box/ombox.css"></templatestyles>

{{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}||{{#switch:Erreur Lua : First parameter must be one of edit, move, create, upload, undelete, autoreview.|sysop|templateeditor|interfaceadmin=|#default=}}}}

{{#ifeq:doc|doc|{{#if:|Modèle:Pp}}|{{#switch:

 {{#if:
 |     
 | {{#ifeq:Module|Module
   | module
   | other
   }}
 }}

| module = <templatestyles src="Module:Message box/ombox.css"></templatestyles>

| other | #default = Modèle:Error }}}}

This module causes an error if any nil global is read or if any global is written to, with the exception of arg. To use, add <syntaxhighlight lang="lua" inline>require('Module:No globals')</syntaxhighlight> to the top of the module using it. The arg variable is excluded because it is necessary for Scribunto's require function to work properly. (See the Scribunto source code here.)

See also