parameter_count()

From ENIGMA

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
{{FuncTitle|parameter_count}}
{{FuncTitle|parameter_count}}
== Description ==
== Description ==
-
General description of the function.
+
Gets the number of command line parameters that were passed to the game and returns the result.
== Parameters ==
== Parameters ==
Line 11: Line 11:
== Return Values ==
== Return Values ==
-
'''integer''': Returns...
+
'''integer''': Returns the number of command line parameters.
== Example Call ==
== Example Call ==
<syntaxhighlight lang="edl">
<syntaxhighlight lang="edl">
-
// Example of using the function.
+
// demonstrates iterating the command line parameters and showing them to the user
 +
for (i = 0; i < parameter_count(); i++) {
 +
  show_message(parameter_string(i));
 +
}
</syntaxhighlight>
</syntaxhighlight>
 +
__NOTOC__
__NOTOC__
{{Function:GM}}
{{Function:GM}}

Latest revision as of 19:30, 22 April 2014

Description

Gets the number of command line parameters that were passed to the game and returns the result.

Parameters

Parameter Description
none this function has no parameters

Return Values

integer: Returns the number of command line parameters.

Example Call

// demonstrates iterating the command line parameters and showing them to the user
for (i = 0; i < parameter_count(); i++) {
  show_message(parameter_string(i));
}
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox