{"name":"isClass","operator":null,"title":"isClass","type":"command","url":"https://community.bistudio.com/wiki/isClass","revid":341206,"updated":"2023-05-13T22:33:10Z","groups":["Config"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Check if config entry represents config class.","syntaxes":[{"syntax":"isClass config","since":null,"effect":null,"exec":null,"params":[{"name":"config","type":"Config","optional":false,"default":null,"description":null,"types":["Config"],"since":null,"text":"config: Config"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"unary","operator":null,"left":null,"right":{"text":"config","types":["Config"]}}],"examples":[{"text":"```sqf\n_ok = isClass (configFile >> \"CfgVehicles\");\n```\n\n Result is true.","code":["_ok = isClass (configFile >> \"CfgVehicles\");"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["configFile","a / b","configName","count","getArray","getText","getNumber","inheritsFrom","isArray","isNumber","isText","select"],"notes":[{"user":"Kronzky","date":"2007-03-02T01:17:00Z","text":"This command allows you to check for the presence of an addon.\n isClass (configFile >> \"cfgVehicles\" >> \"MyCustomCar\")\nwill return true if the addon \"MyCustomCar\" is installed, and false if it is not installed.\n\n*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.*"},{"user":"ffur2007slx2_5","date":"2014-03-31T15:45:00Z","text":"(Arma 3 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.\n(But as a function created specifically for A3 campaign, it is in no way intended as a replacement for isClass.\nSo it is not suggested to use it for configFile classes. But isClass instead.)\nE.g.\n\n```sqf\n[\"Something1\", \"Something2\", \"Something3\"] call BIS_fnc_getCfgIsClass; // same as isClass (missionConfigFile >> \"Something1\" >> \"Something2\" >> \"Something3\")\n```"}],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Config","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}