supportInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Add since template usage)
Line 19: Line 19:
* <tt>""</tt> - list all types and commands
* <tt>""</tt> - list all types and commands
* <tt>"t:*"</tt> - list all types
* <tt>"t:*"</tt> - list all types
* <tt>"*:&lt;command&gt;*"</tt> - list all entries for script &lt;command&gt;
* <tt>"*:&lt;command&gt;*"</tt> - list all entries for script ''&lt;command&gt;''
* <tt>"i:&lt;command&gt;"</tt> - (since Arma 3 v1.99.146528) extended information about script &lt;command&gt; in format: <br>&nbsp;&nbsp;<tt>[<nowiki>[</nowiki>commandType, lowerCaseName, camelCaseName, description, example, exampleResult, returnType, leftArgType, rightArgType, commandSyntax (Since Arma 3 v2.01.146751)],...]</tt>
* <tt>"i:&lt;command&gt;"</tt> - extended information about script ''&lt;command&gt;'', [[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:*"</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.}} |DESCRIPTION=
|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 29: Line 28:
|p1= mask: [[String]] |PARAMETER1=
|p1= mask: [[String]] |PARAMETER1=


| [[Array]] - array with requested info or empty array [] |RETURNVALUE=
| [[Array]] - array with requested info or empty array <tt>[]</tt> |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[supportInfo]] "b:select*";   //Returns ["b:ARRAY select SCALAR","b:ARRAY select BOOL","b:CONFIG select SCALAR"]</code> |EXAMPLE1=
|x1= <code>[[supportInfo]] "b:select*"; {{cc|returns ["b:ARRAY select SCALAR","b:ARRAY select BOOL","b:CONFIG select SCALAR"]}}</code> |EXAMPLE1=
 
|x2= Return all available commands: <code>_commands = [[supportInfo]] "";</code> |EXAMPLE2=
|x2= Return all available commands: <code>_commands = [[supportInfo]] "";</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[productVersion]], [[requiredVersion]] |SEEALSO=
| [[productVersion]], [[requiredVersion]] |SEEALSO=
}}
}}


<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>
<dl class="command_description">
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|SUPPORTINFO]]
[[Category:Scripting Commands Armed Assault|SUPPORTINFO]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_System|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
Line 59: Line 52:
<dd class="note">
<dd class="note">
To get the list of all supported commands in Arma 3 one can simply:
To get the list of all supported commands in Arma 3 one can simply:
<code>{[[diag_log]] _x} [[forEach]] [[supportInfo]] "";</code>
<code>{ [[diag_log]] _x } [[forEach]] [[supportInfo]] "";</code>
</dd>
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 19, 2020 - 10:23 (UTC)</dd>
<dd class="notedate">Posted on October 19, 2020 - 10:23 (UTC)</dd>
<dt class="note">[[User:7erra|7erra]]</dt>
<dt class="note">[[User:7erra|7erra]]</dt>
Line 77: Line 66:
_command {{=}} [[switch]] [[count]] _x [[do]] {
_command {{=}} [[switch]] [[count]] _x [[do]] {
[[case]] 1;
[[case]] 1;
[[case]] 2: {_x[[a_hash_b|#]]0};
[[case]] 2: { _x [[a_hash_b|#]] 0 };
[[case]] 3: {_x[[a_hash_b|#]]1};
[[case]] 3: { _x [[a_hash_b|#]] 1 };
[[default]] {[[nil]]};
[[default]] {[[nil]]};
};
};

Revision as of 22:37, 23 December 2020

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

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)]
"i:*" is not a wildcard but returns information about the multiplication operator instead.
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
This code will return the detailed information on all commands as if supportInfo "i:*" would return all commands: _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