🔢 Operators
ZeroTrace supports dynamic operators (prefixed with _$
) and variables that can work together to create flexible, dynamic scripts.
📝 Operator Syntax Rules
- Standalone or in variables - Can be used directly or assigned to variables
- Always starts with
_$
- Identifies it as an operator - Parentheses enclose arguments - Required even for no-argument operators
- Case-sensitive names - Must match exactly as documented
Valid Usage:
Invalid Usage:
🔢 Available Operators
Random Number Generation
Example:
Input: _&random(1, 10)
Output: 7
(random number between 1 and 10)
Example:
Input: _&random_number()
Output: 3
🧩 Practical Examples
Dynamic Configuration
or
💡 Pro Tip: Combine variables and operators to create dynamic, adaptable scripts that change behavior each run!
Important: When using operators in variables:
- Wrap the operator in quotes for assignment
- Use
${variable}$
syntax when referencing - Operators still can't be embedded in normal strings
- ❗ You cannot nest random operators inside each other.
For example:
_&random(1, _&random(2,5))
is invalid. Always use separate variables instead.