24 lines
520 B
Plaintext
24 lines
520 B
Plaintext
[##]
|
|
You can update the value of a variable with 'sets'.
|
|
[/##]
|
|
|
|
[set my_var]5[/set]
|
|
[sets my_var="my_var + 100"]
|
|
Value of my_var: [get my_var]
|
|
|
|
|
|
[##]
|
|
Old method (should still work):
|
|
|
|
You can add or subtract from an existing variable with 'set'.
|
|
|
|
This is made possible with the '_append' argument.
|
|
|
|
It applies the shortcode content to your variable additively.
|
|
|
|
You can use negative numbers for subtraction.
|
|
[/##]
|
|
|
|
[set my_var]5[/set]
|
|
[set my_var _append]100[/set] [# my_var now equals 105!]
|
|
Value of my_var: [get my_var] |