var

5reg

var

A single script variable

Content Model
    var ::=
Attributes
Name | Type | Version
`name` | `CDATA` (required) |
`valueid` | `CDATA` (required) | &attraddedver;4.95
`value` | `CDATA` (deprecated) | &attrdepver;4.95

## Description

A &xml-var; element stores a single script variable.

Script packets may contain variables representing other packets in the same packet tree, allowing easy access to these other packets from within a script.

### Parents

The following elements contain `var`:

- &xml-script;

.

### Children

Element `var` has no children.

## Attributes

`name`

- The variable name. Variable names are case sensitive.

`valueid`

- The value of this variable. This should a packet identifier; specifically, it must match the `id` attribute that is stored in the value's `packet` tag. If the variable has a null value, then this should be the empty string.

`value`

- Deprecated. This stores the value of this variable as a packet label; specifically, it must match the `label` attribute that is stored in the value's `packet` tag.

  You should write this tag if you want your file to be read by ®ina; 4.94 or earlier. Later versions of ®ina; can also read it; however, they prefer the new `valueid` since (unlike packet labels) packet IDs are guaranteed to be unique.