Introduced in

Version:1.00

Description

Description:

Deletes a sub-class of a class. Classes must not contain any sub-classes, or ones that are still referenced, in order to be deleted.

If the class is read from memory (for example, a configuration file that is part of VBS, such as configFile>>"CfgVehicles"), then deleting and re-creating that class leads to unpredictable results (due to caching). Some class parameters may come from the new definition, others may come from the original (deleted) one, so re-creating classes should be avoided.

Syntax

Syntax:configfile deleteClass classname
Parameters:
  • configfile: Config-2 - Configuration file.
  • classname: String - Name of class to delete.
Return Value:Boolean - Returns true, if the class is deleted successfully, false otherwise.

Examples

Examples:
_class = configFile deleteClass "NewClass";
_class = (configFile>>"CfgWeapons") deleteClass "myNewGun";

Additional Information

See also: addClassisDeleted
Multiplayer:
Problems:

Notes