isClass: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|gr1= Config |GROUP1=
|gr1= Config






|1.00|Game version=
|1.00


| Check if config entry represents config class. |DESCRIPTION=
| Check if config entry represents config class.


| [[Boolean]] <nowiki>=</nowiki> '''isClass''' config |SYNTAX=
| [[Boolean]] <nowiki>=</nowiki> '''isClass''' config
|p1 = config: [[Config]]
|p1 = config: [[Config]]
| [[Boolean]] |RETURNVALUE=
| [[Boolean]]


|x1 = <code>_ok = [[isClass]] ([[configFile]] [[gtgt|>>]] "CfgVehicles");</code> Result is [[true]]. |EXAMPLE1=
|x1 = <code>_ok = [[isClass]] ([[configFile]] [[gtgt|>>]] "CfgVehicles");</code> Result is [[true]].


| [[configFile]], [[config/name]], [[configName]], [[count]], [[getArray]], [[getText]], [[getNumber]], [[inheritsFrom]], [[isArray]], [[isNumber]], [[isText]], [[select]] |SEEALSO=
| [[configFile]], [[config/name]], [[configName]], [[count]], [[getArray]], [[getText]], [[getNumber]], [[inheritsFrom]], [[isArray]], [[isNumber]], [[isText]], [[select]]


}}
}}

Revision as of 00:40, 18 January 2021

Hover & click on the images for description

Description

Description:
Check if config entry represents config class.
Groups:
Config

Syntax

Syntax:
Boolean = isClass config
Parameters:
config: Config
Return Value:
Boolean

Examples

Example 1:
_ok = isClass (configFile >> "CfgVehicles"); Result is true.

Additional Information

See also:
configFileconfig/nameconfigNamecountgetArraygetTextgetNumberinheritsFromisArrayisNumberisTextselect

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

Posted on March 2, 2007 - 01:17
Kronzky
This command allows you to check for the presence of an addon. isClass (configFile >> "cfgVehicles" >> "MyCustomCar") will return true if the addon "MyCustomCar" is installed, and false if it is not installed. You will have to know under which class the addon is categorized (in this case "cfgVehicles") to be able to use the right config path.
Posted on Mar 31, 2014 - 15:45
ffur2007slx2_5
(ArmA3 ver 1.14) According to BI Dev Karel Mořický, BIS_fnc_getCfgIsClass provides a comfortable workaround with custom config under description.ext compared with isClass. (But as a function created specifically for A3 campaign, it is in no way intended as a replacement for isClass. So it is not suggested to use it for configFile classes. But isClass instead.) E.g. ["Something1","Something2","Something3"] call bis_fnc_getCfgIsClass
//Same as isClass (missionconfigfile >> "Something1" >> "Something2" >> "Something3")

Bottom Section