Set
set gives a variable a value. The value can be an expression, which is worked out
first.
Parameters
Section titled “Parameters”| Parameter | Meaning |
|---|---|
variable |
Any variable a script can write: %x, !x, *x, or a read/write system variable such as #LPC. |
value |
Optional. A value or expression. Without it, the variable becomes empty. |
Details
Section titled “Details”- One word only. A value is a single word:
set %a hello worldstoreshello. Join words with_, or glue them with commas:set %a hello , #spc , world. absafter the value stores its absolute value:set %a -5 absstores5.- A lone
+or-after a number adds or takes away 1:set %i %i +is the same asset %i %i + 1.
Example
Section titled “Example”set %a 2set %b $A ; hexadecimal: 10set %c ( %a * %b ) + 1 ; 21set %d %a * ( %b + 1 ) ; 22set %name Sir , #spc , Robin ; "Sir Robin"set %emptyset #LPC 100display ok %c %d %namehaltSee also
Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.