Es set

From EventScripts Community Encyclopedia


Overview

Syntax: es_set <variable-name> <value> [description]

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xset

Description

Creates and/or sets the named variable to the value. If the variable is created for the first time, it will also optionally set its internal description for reference.

Parameters

  • <variable-name> - the name of the variable to create and/or set
  • <value> - the value the variable should become
  • [description] - Optional: Sets the internal description for the variable.


Examples

// creates a server variable and initializes it to "hello"
es_set myvar "hello" "This is an example variable"
 
es_set myvar2 "hello, again!" // Note the description isn't required. 


Notes

  • This command acts exactly like es_setinfo with the exception of the optional description.
  • This command is preferred over es_setinfo for its speed and code readability.
  • This command was introduced in EventScripts version 1.5.


See also


blog comments powered by Disqus