TLO:Defined

From the wonderful RedGuides Wiki

Determines whether a variable, array, or timer with this name exists. The variable, array or timer must not be enclosed with ${}.

This TLO is added by MacroQuest

Forms

Type Member Description
bool Defined[name]

Access to Types

Type Description
bool Unlike bool in most programming and scripting languages, bool in MacroQuest is unique: Any non-zero value evaluates to true. However, 0 still equals false, and 1 still equals true.

Examples

/if (${Defined[varname]}) {
  /echo ${varname}
}

See also