Help:Dplvar
From Dragon Mania Legends (DML) Wiki
|
Manual | dplvar |
Syntax
- Sets one symbolic variable name and assign a value:
{{#dplvar:set|varname|valueofvar}}
- Sets multiple symbolic variable names and assigns values to them (one after the other):
{{#dplvar:set|name1|value1|name2|value2|..|..}}
- Assigns a value only if the variable is empty / has not been used so far:
{{#dplvar:default|name|value}}
- Returns the current value of the variable:
{{#dplvar:name}}
Example 1, Part 1:
This sets a variable, names it "varName", and then assigns the value "My Value" to it.
Note: The result is empty because setting a variable simply assigns a value, it doesn't also display that variable.
{{#dplvar:set|varName|My Value}}
Example 1, Part 2:
This displays the (already set above) value of the variable called "varName".
{{#dplvar:varName}}