Difference between revisions of "Template:Command"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<noinclude>This template will be removed once the test is complete</noinclude><includeonly>__NOTOC__ __NOEDITSECTION__
+
<includeonly>__NOTOC__ __NOEDITSECTION__
  
 
<div class="command_description">
 
<div class="command_description">
Line 18: Line 18:
 
<dt>Syntax:</dt>
 
<dt>Syntax:</dt>
 
<dd>{{{3}}}</dd>
 
<dd>{{{3}}}</dd>
{{if defined call|{{{p1|}}}|param|{{{p1}}}|<dt>Parameters:</dt>}}{{if defined call|{{{p2|}}}|param|{{{p2}}}}}{{if defined call|{{{p3|}}}|param|{{{p3}}}}}{{if defined call|{{{p4|}}}|param|{{{p4}}}}}{{if defined call|{{{p5|}}}|param|{{{p5}}}}}
+
{{if defined call|{{{p1|}}}|Command-param|{{{p1}}}|<dt>Parameters:</dt>}}{{if defined call|{{{p2|}}}|Command-param|{{{p2}}}}}{{if defined call|{{{p3|}}}|Command-param|{{{p3}}}}}{{if defined call|{{{p4|}}}|Command-param|{{{p4}}}}}{{if defined call|{{{p5|}}}|Command-param|{{{p5}}}}}
 
<dt>Return Value:</dt>
 
<dt>Return Value:</dt>
 
<dd>{{{4|None.}}}</dd>
 
<dd>{{{4|None.}}}</dd>
 
<dt>Multiplayer:</dt>
 
<dt>Multiplayer:</dt>
<dd>{{{5|Behaviour unknown.}}}</dd>
+
<dd>{{{mp|Behaviour unknown.}}}</dd>
 
</dl>
 
</dl>
  
 
== Examples ==
 
== Examples ==
<dl>{{if defined call|{{{x1|}}}|example|{{{x1}}}|<dt>Example 1:</dt>}}{{if defined call|{{{x2|}}}|example|{{{x2}}}|<dt>Example 2:</dt>}}{{if defined call|{{{x3|}}}|example|{{{x3}}}|<dt>Example 3:</dt>}}</dl>
+
<dl>{{if defined call|{{{x1|}}}|Command-example|{{{x1}}}|<dt>Example 1:</dt>}}{{if defined call|{{{x2|}}}|Command-example|{{{x2}}}|<dt>Example 2:</dt>}}{{if defined call|{{{x3|}}}|Command-example|{{{x3}}}|<dt>Example 3:</dt>}}</dl>
  
 
== Additional Information ==
 
== Additional Information ==
 
<dl>
 
<dl>
<dt>See also:</dt><dd>'''{{{6|}}}'''</dd>
+
<dt>See also:</dt><dd>'''{{{5|}}}'''</dd>
 
</dl>
 
</dl>
  
Line 37: Line 37:
  
  
</dl></div></includeonly>
+
</dl></div></includeonly><noinclude>
 +
 
 +
'''This template is not yet complete!'''
 +
 
 +
== Syntax ==
 +
 
 +
You can insert a command using the following syntax:
 +
 
 +
<pre>{{Command|=
 +
____________________________________________________________________________________________
 +
 
 +
| GAME_VERSION |=
 +
____________________________________________________________________________________________
 +
 
 +
| DESCRIPTION |=
 +
____________________________________________________________________________________________
 +
 
 +
| SYNTAX |=
 +
 
 +
|p1= PARAMETER1 |=
 +
 
 +
|p2= PARAMETER2 |=
 +
 
 +
|p3= PARAMETER3 |=
 +
 
 +
|p4= PARAMETER4 |=
 +
 
 +
|p5= PARAMETER5 |=
 +
 
 +
| RETURNVALUE |=
 +
 
 +
|mp= MPBEHAVIOUR |=
 +
____________________________________________________________________________________________
 +
 
 +
|x1= EXAMPLE1 |=
 +
____________________________________________________________________________________________
 +
 
 +
|x2= EXAMPLE2 |=
 +
____________________________________________________________________________________________
 +
 
 +
|x3= EXAMPLE3 |=
 +
____________________________________________________________________________________________
 +
 
 +
| SEEALSO |=
 +
 
 +
}}</pre>
 +
 
 +
== Parameters ==
 +
 
 +
'''All of the following parameters should be replaced by reasonable text!'''
 +
 
 +
The parameter GAME_VERSION is obvious: It contains the version number when this command was included.
 +
 
 +
The parameter DESCRIPTION should contain a brief but detailed description of the command.
 +
 
 +
The parameter SYNTAX should show the syntax for the command. There are several possibilities of format:
 +
<pre>'''commandName'''
 +
 
 +
preargument '''commandName'''
 +
 
 +
'''commandName''' postargument
 +
 
 +
preargument '''commandName''' postargument
 +
 
 +
[prearg1, prearg2] '''commandName''' postargument
 +
 
 +
preargument '''commandName''' [postarg1, postarg2]</pre>
 +
etc. You get the drill.
 +
 
 +
PARAMETER1 to PARAMETER5 are all optional and should contain descriptions of the parameters. If there are no parameters, delete all lines. If there are two parameters, mention only |p1= PARAM | and |p2= PARAM | and delete |p3=, |p4= and |p5=. The format should be one of the following two:
 +
<pre>parameter: [[Type]]
 +
 
 +
parameter: [[Type]] - Description</pre>
 +
 
 +
The parameter RETURNVALUE should contain a description of the return value. Again, there are two possible formats:
 +
<pre>[[Type]]
 +
 
 +
[[Type]] - Description</pre>
 +
 
 +
The parameter MPBEHAVIOUR should contain a description of the command's behaviour in multiplayer. If you have no description, delete the line.
 +
 
 +
The parameters EXAMPLE1 to EXAMPLE3 are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (using <nowiki><pre> or <code></nowiki> ?) including descriptions of the examples.
 +
 
 +
The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for [[doFire]] would be:
 +
<pre>[[commandFire]], [[fire]]</pre>
 +
 
 +
 
 +
[[Category:Templates]]
 +
</noinclude>

Revision as of 14:30, 28 July 2006


This template is not yet complete!

Syntax

You can insert a command using the following syntax:

{{Command|=
____________________________________________________________________________________________

| GAME_VERSION |=
____________________________________________________________________________________________

| DESCRIPTION |=
____________________________________________________________________________________________

| SYNTAX |=

|p1= PARAMETER1 |=

|p2= PARAMETER2 |=

|p3= PARAMETER3 |=

|p4= PARAMETER4 |=

|p5= PARAMETER5 |=

| RETURNVALUE |=

|mp= MPBEHAVIOUR |=
____________________________________________________________________________________________

|x1= EXAMPLE1 |=
____________________________________________________________________________________________

|x2= EXAMPLE2 |=
____________________________________________________________________________________________

|x3= EXAMPLE3 |=
____________________________________________________________________________________________

| SEEALSO |=

}}

Parameters

All of the following parameters should be replaced by reasonable text!

The parameter GAME_VERSION is obvious: It contains the version number when this command was included.

The parameter DESCRIPTION should contain a brief but detailed description of the command.

The parameter SYNTAX should show the syntax for the command. There are several possibilities of format:

'''commandName'''

preargument '''commandName'''

'''commandName''' postargument

preargument '''commandName''' postargument

[prearg1, prearg2] '''commandName''' postargument

preargument '''commandName''' [postarg1, postarg2]

etc. You get the drill.

PARAMETER1 to PARAMETER5 are all optional and should contain descriptions of the parameters. If there are no parameters, delete all lines. If there are two parameters, mention only |p1= PARAM | and |p2= PARAM | and delete |p3=, |p4= and |p5=. The format should be one of the following two:

parameter: [[Type]]

parameter: [[Type]] - Description

The parameter RETURNVALUE should contain a description of the return value. Again, there are two possible formats:

[[Type]]

[[Type]] - Description

The parameter MPBEHAVIOUR should contain a description of the command's behaviour in multiplayer. If you have no description, delete the line.

The parameters EXAMPLE1 to EXAMPLE3 are again all optional. If you don't include one of them, delete the line. They should contain examples for the command (using <pre> or <code> ?) including descriptions of the examples.

The parameter SEEALSO should contain a comma-separated list of links related to this command. Example for doFire would be:

[[commandFire]], [[fire]]