User Tools

Site Tools


arma:config:common_errors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arma:config:common_errors [2009/04/26 14:18] – created common_errors initial page. snakemanarma:config:common_errors [2024/08/01 07:37] (current) – links added. snakeman
Line 1: Line 1:
-====== Common Errors ======+====== ArmA 1 Common Errors ======
  
-ArmA common errors in configs which you should and need to avoid at all cost.+[[https://www.pmctactical.org/forum/viewforum.php?f=42|ArmA 1 Forum]], [[:arma|ArmA 1 Home]], [[arma:config|ArmA 1 Config]], [[arma:tools|ArmA 1 Tools]], [[arma:file_formats|ArmA 1 File Formats]], [[arma:missions|ArmA 1 Missions]], [[arma:modeling|ArmA 1 3D Modeling]], [[arma:terrain|ArmA 1 Terrain]], [[arma:texturing|ArmA 1 Texturing]], [[arma:scripting|ArmA 1 Scripting]]
  
-For example on many many addons (even in BIS material) you'll see this [[arma:arma.rpt|arma.rpt]] error:+**ArmA 1** aka Armed Assault (ArmA) 
 + 
 +ArmA 1 common errors in configs which you should and need to avoid at all cost. 
 + 
 +===== Changing The Inheritance Of Existing Classes ===== 
 + 
 +For example on many many addons (even in bis material) you'll see this [[arma:arma.rpt|arma.rpt]] error:
 <code> <code>
 Updating base class ->MGunCore, by ca\weapons\config.bin/cfgWeapons/MGun/ Updating base class ->MGunCore, by ca\weapons\config.bin/cfgWeapons/MGun/
 </code> </code>
-You can avoid this error by not changing the MGunCore class, instead using your own new class by inheriting from this MGunGore.+This happens because an addon changes the inheritance of a class that has already been defined. In the example above, 
 +bis themselves does this in the ''Addons\weapons.pbo'' addon, where the basic class ''MGun'' is altered from 
 +having no parent class to having the class ''MGunCore'' as the parent.
  
-Other common errors:+The warning is printed like this: 
 + 
 +''Updating base class //OldClass//->**//NewClass//**, by \path\to\the\config.bin/CfgSomeClass/**Classname**'' 
 + 
 +This means that ''**Classname**'' was changed from being based on the old base class (''//OldClass//'') to the new base class (''**//NewClass//**''). 
 + 
 +(In the ''MGun'' [[arma:arma.rpt|arma.rpt]] error example, ''//OldClass//'' was empty, ie ''MGun'' did not have a parent class.) 
 + 
 +How do you avoid this warning? It's simple: **don't change the inheritance of existing classes** 
 + 
 + 
 +===== Altering Existing Classes ===== 
 +Sometimes you see addons that not only alters the inheritance of existing bis classes, but then proceeds to make changes to the classes themselves. 
 +An example of this can be seen below: 
 + 
 +Bad config: 
 +<code cpp> 
 +class MGunCore; 
 +class MGun: MGunCore 
 +
 + displayName = "MyCoolGun"; 
 +}; 
 +</code> 
 +That's just bad form. What you should do instead is create your own machine gun class and let it inherit from the existing bis class. 
 + 
 +Good config: 
 +<code cpp> 
 +class MGun; 
 +class TAG_MGun: MGun 
 +
 + displayName = "MyCoolGun"; 
 +}; 
 +</code> 
 + 
 +===== Other Common Errors =====
 <code> <code>
 Updating base class ->Default, by ca\anims\characters\config.bin/CfgMovesBasic/DefaultDie/ Updating base class ->Default, by ca\anims\characters\config.bin/CfgMovesBasic/DefaultDie/
Line 22: Line 64:
 Updating base class HeavyReammoBox->Land_garaz_s_tankem, by <addon>\config.bin/CfgVehicles/HeavyReammoBoxEast/ Updating base class HeavyReammoBox->Land_garaz_s_tankem, by <addon>\config.bin/CfgVehicles/HeavyReammoBoxEast/
 </code> </code>
-All can be avoided by not touching these base classes, just iheriting from them into your own new classes.+All can be avoided by not touching these base classes, just inheriting from them into your own new classes. 
arma/config/common_errors.1240755537.txt.gz · Last modified: 2009/04/26 14:18 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.