Global variable

Description
Global variables persist past a script's termination, and they can be referred to by any other script. A script should not reuse the same variable name unless intentionally making changes to it to affect other scripts.


 * 1) var is used to declare global variables (see the example below).

Global variables are normally cleared when Genie is closed. However, global variables can be saved to the user's profile, allowing them to persist indefinitely.

It is generally better to use local variables in order to protect against other scripts accidentally creating conflicts.

Several global variables already exist and are managed by Genie.

Syntax
$

Parameters

 * name
 * the name of a variable storing a value

Examples
put hide pause if ($hidden) then echo You are now hidden! else echo You failed to hide! put #var default_spell MAF

cast.cmd var spell $default_spell if_1 var spell %1

put prep %spell