Skip to content

Scripting: set & variables

TurdPooCharger edited this page May 29, 2018 · 6 revisions

The set command defines or creates variables. Variables are fundamental to any programming.

Usage

Syntax & Example

set <var> <arg>

User Defined Variables

Example 1
set VARIABLE "argument"
echo $[VARIABLE]

Output:

argument

In this example, the value of the variable called VARIABLE is argument. The value is re-definable.

set VARIABLE "negotiate"
echo $[VARIABLE]

Output:

negotiate

Variables may hold empty or null placeholder values.

set VARIABLE ""
echo $[VARIABLE]

Output:

Environmental Variables

These are preset variables integral to GodMode9 in which their values cannot redefined.

Example 2
echo $[GM9OUT]

Output:

0:/gm9/out

set GM9OUT "0:/gm9/in"
echo $[GM9OUT]

Output:

0:/gm9/out

Notes