config greater greater name: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Fix)
 
(53 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.00


|1.00|= Game version
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


|Returns subentry of config entry with given name. Identical to [[config/name]].  |= Description
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| '''''config'' >> ''name'''''|= Syntax
|game4= tkoh
|version4= 1.00


| p1 = config: [[Config]]|=Parameter 1
|game5= arma3
|version5= 0.50


|p2 = name: [[String]] | = Parameter 2
|gr1= Config


|descr= Returns [[Config | config]] entry with given name (alias of [[a / b]], slightly faster but with [[Operators#Order of Precedence|lower precedence]])


| [[Config]] |= Return value
|s1= config [[config greater greater name|>>]] name
____________________________________________________________________________________________


| x1 = <code>[[configFile]] [[config greater greater name|>>]] "CfgVehicles";</code> | = Example 1
|p1= config: [[Config]]


| [[configFile]], [[config/name]], [[configName]], [[count]], [[getText]], [[isArray]], [[isClass]], [[isNumber]], [[isText]], [[select]], [[configClasses]] |= See also
|p2= name: [[String]]


}}
|r1= [[Config]] - config entry


<h3 style="display:none">Notes</h3>
|x1= <sqf>configFile >> "CfgVehicles";</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on Jul 19, 2014 - 20:08
<dt class="note">'''[[User:ffur2007slx2_5|ffur2007slx2_5]]'''<dd class="note">
(ArmA3 1.24) It is recommended to use [[configClasses]] instead of [[BIS_fnc_getCfgSubClasses]] and [[BIS_fnc_uniqueClasses]] on subclasses collection or conditional selection.
<code>
_faces = "[[true]]" [[configClasses]] ([[configFile]] >> "Cfgfaces");
//same as: _faces = (configfile >> "CfgFaces") [[call]] [[BIS_fnc_getCfgSubClasses]];
</code>
<code>
//Extract all animals:
animals = "(([[configName]] _x) [[isKindOf]] 'animal')" [[configClasses]] ([[configFile]] >> "CfgVehicles");
/*same as:
aniamls = [];
[([[configFile]] >> "CfgVehicles"),{
[[if]] (([[configName]] _this) [[isKindOf]] “animal”) [[then]] {
  animals [[set]] [ [[count]] animals, _this]
  }
}
] [[call]] [[BIS_fnc_uniqueClasses]];*/
</code>
Return nested subclasses, currently still [[BIS_fnc_returnChildren]]
<code>
//Return all nested config classes.<br>
[([[configFile]] >> "CfgFaces"),1, [[true]], [[true]] ] [[call]] [[BIS_fnc_returnChildren]];
</code>


<dd class="notedate">Posted on Apr 06, 2016 - 08:28
|seealso= [[configFile]] [[a / b]] [[configName]] [[count]] [[getText]] [[isArray]] [[isClass]] [[isNumber]] [[isText]] [[select]] [[configClasses]]
<dt class="note">'''[[Pierre MGI]]'''<dd class="note">
}}
The post from ffur2007slx2_5 above is not exact.
<code>
"true" configClasses (configFile >> "Cfgfaces"); will return an array of classes.
[config.bin/CfgFaces/Kerry,...]
(configfile >> "CfgFaces") call BIS_fnc_getCfgSubClasses; will return an array of strings.
["Kerry",.....]
</code>
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|#]]
[[Category:Scripting Commands ArmA|#]]
[[Category:Scripting Commands ArmA2|#]]
[[Category:Scripting Commands Arma 3|#]]
[[Category:Command_Group:_System_Commands|#]]

Latest revision as of 23:51, 29 April 2024

Hover & click on the images for description

Description

Description:
Returns config entry with given name (alias of a / b, slightly faster but with lower precedence)
Groups:
Config

Syntax

Syntax:
config >> name
Parameters:
config: Config
name: String
Return Value:
Config - config entry

Examples

Example 1:
configFile >> "CfgVehicles";

Additional Information

See also:
configFile a / b configName count getText isArray isClass isNumber isText select configClasses

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