Es getargv

From EventScripts Community Encyclopedia


Overview

Syntax: es_getargv <variable> <argument>

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_xgetargv

Description

Gets a specified argument from the last command that was sent.

Parameters

  • variable - Variable you would like the argument value to be stored in.
  • argument - Argument number, e.g 1


Examples

block load
{
   es_regcmd test script/test "test command"
}
 
block test
{
   es_xsetinfo var 0
   es_getargv var 1
}

This will store the first argument into the variable var. So if you were to type:

test arg1 arg2 arg3

It would return "arg1" because it was the first argument entered.


Notes

  • Calling es_getargv for argument 0 will retrieve the name of the command called.


See also

blog comments powered by Disqus