Es getargc

From EventScripts Community Encyclopedia


Overview

Syntax: es_getargc <variable>

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_xgetargc

Description

Returns the number of arguments sent to a command that has been registered with es_regcmd.

Parameters

  • variable - Variable to store the number of arguments into.


Examples

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

This will store the number of arguments, including the command, into the variable var. So if you were to type:

test arg1 arg2 arg3

It would return "4" because there are 3 arguments entered plus the "test" command.


Notes

(None)


See also

blog comments powered by Disqus