supportInfo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|gr1= System | |gr1= System | ||
| Creates a list of supported operators and type. Each field of array has the format: "x:name" Where x can be: | | Creates a list of supported operators and type. Each field of array has the format: "x:name" Where x can be: | ||
Line 19: | Line 19: | ||
* <tt>"*:<command>*"</tt> - list all entries for script ''<command>'' | * <tt>"*:<command>*"</tt> - list all entries for script ''<command>'' | ||
* <tt>"i:<command>"</tt> - extended information about script ''<command>'', [[Array]] of [[Array]] of [[String]]s in format:{{Since|arma3|1.99146528|y}}<br>[type, lowerCaseName, camelCaseName, description, example, result, resultType, leftArgType, rightArgType, syntax ({{Since|arma3|2.01.146751}})] | * <tt>"i:<command>"</tt> - extended information about script ''<command>'', [[Array]] of [[Array]] of [[String]]s in format:{{Since|arma3|1.99146528|y}}<br>[type, lowerCaseName, camelCaseName, description, example, result, resultType, leftArgType, rightArgType, syntax ({{Since|arma3|2.01.146751}})] | ||
{{Informative | <tt>"i:*"</tt> is not a wildcard but returns information about the [[a * b|multiplication operator]] instead.}} | {{Informative | <tt>"i:*"</tt> is not a wildcard but returns information about the [[a * b|multiplication operator]] instead.}} | ||
| '''supportInfo''' mask | | '''supportInfo''' mask | ||
|p1= mask: [[String]] | |p1= mask: [[String]] | ||
| [[Array]] - array with requested info or empty array <tt>[]</tt> | | [[Array]] - array with requested info or empty array <tt>[]</tt> | ||
|x1= <code>[[supportInfo]] "b:select*"; {{cc|returns ["b:ARRAY select SCALAR","b:ARRAY select BOOL","b:CONFIG select SCALAR"]}}</code> | |x1= <code>[[supportInfo]] "b:select*"; {{cc|returns ["b:ARRAY select SCALAR","b:ARRAY select BOOL","b:CONFIG select SCALAR"]}}</code> | ||
|x2= Return all available commands: <code>_commands = [[supportInfo]] "";</code> | |x2= Return all available commands: <code>_commands = [[supportInfo]] "";</code> | ||
| [[productVersion]], [[requiredVersion]] | | [[productVersion]], [[requiredVersion]] | ||
}} | }} | ||
Revision as of 11:24, 18 January 2021
Description
- Description:
- Creates a list of supported operators and type. Each field of array has the format: "x:name" Where x can be:
'name' is the operator or type name (in case operator, type of input operands is included).
mask parameter can be an empty string, or one of field. In this case, function returns empty array, if operator is not included in the list. Limited wildcard support is available. Type x may be replaced with *, meaning all types. For the mask partial match may be used, like abc*, meaning any operators starting with 'abc' are reported, for example:
- "" - list all types and commands
- "t:*" - list all types
- "*:<command>*" - list all entries for script <command>
- "i:<command>" - extended information about script <command>, Array of Array of Strings in format:Template:Since
[type, lowerCaseName, camelCaseName, description, example, result, resultType, leftArgType, rightArgType, syntax (Template:Since)]
- Groups:
- System
Syntax
- Syntax:
- supportInfo mask
- Parameters:
- mask: String
- Return Value:
- Array - array with requested info or empty array []
Examples
- Example 1:
supportInfo "b:select*"; // returns ["b:ARRAY select SCALAR","b:ARRAY select BOOL","b:CONFIG select SCALAR"]
- Example 2:
- Return all available commands:
_commands = supportInfo "";
Additional Information
- See also:
- productVersionrequiredVersion
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on September 24, 2014 - 19:27 (UTC)
- Killzone Kid
-
To get the list of all supported commands in Arma 3 one can simply:
{ diag_log _x } forEach supportInfo "";
- Posted on October 19, 2020 - 10:23 (UTC)
- 7erra
-
Since you can't use
supportInfo "i:*"
as a wildcard to get a list of all commands with detailed information, use this code instead:_allCommands = []; supportInfo "" apply { _x splitString ":" params ["_t", "_x"]; if (_t != "t") then { _x = _x splitString " "; _command = switch count _x do { case 1; case 2: { _x # 0 }; case 3: { _x # 1 }; default {nil}; }; _allCommands pushBackUnique _command; }; }; _allCommands sort true; _allCommands = _allCommands apply { supportInfo format["i:%1", _x] }; _allCommands