Skip to reference

Beta reference. Prepared from development builds for this version. This reference does not describe the current stable release.

A verified stable reference is not available yet. Choose a prepared beta version above.

Variables · supported

{math:(10 + 5) * 2}

Safely evaluate basic arithmetic

variable.global.math · 2.8.0

Browse all entries

Requirements and availability

Values depend on the invocation context; timers and buttons do not have an incoming viewer.

Picker contexts: automation, timer, command, pad.

Variable providers: twitch, youtube, kick, tiktok.

Behavior

Basic + - * / % and parentheses, maximum 100 expression characters; division by zero/nonfinite/absolute result over 1e15 fails to Unavailable. No script execution.

Contract details

Key
math
Syntax
{math:(10 + 5) * 2}
Category
Utility
Description
Safely evaluate basic arithmetic
Canonical Key
math
Aliases
[]
Producer
Global command variable engine, resolved on demand.
Fallback
Unavailable
Fallback Note
This fallback applies on null/error/timeout; a resolver may return its own 0, empty string or descriptive value instead.
Lifetime
Resolved for this template; data may be live, cached or persisted according to its provider.

Examples

A single variable expression; context and data prerequisites still apply.

{math:(10 + 5) * 2}

Related entries

Source and verification

Source-reviewed for 2.8.0. Connected-service validation remains subject to release UAT.

  • server.js — COMMAND_VARIABLE_DEFINITIONS.math
  • src/features/command-variables.js — createCommandVariableEngine

Source revision: 472fb34b484eeef0b663d28cacb628a7b9f14ff1

Downloads and AI prompt
Download JSONDownload Markdown