arma:config:common_errors
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| arma:config:common_errors [2009/04/26 14:49] – created common_errors initial page. snakeman | arma:config:common_errors [2024/08/01 07:37] (current) – links added. snakeman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Common Errors ====== | + | ====== |
| - | ArmA common errors in configs which you should and need to avoid at all cost. | + | [[https:// |
| - | For example on many many addons (even in BIS material) you'll see this [[arma: | + | **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: | ||
| < | < | ||
| Updating base class -> | Updating base class -> | ||
| </ | </ | ||
| - | You can avoid this error by not changing | + | This happens because an addon changes |
| + | bis themselves does this in the '' | ||
| + | having no parent class to having the class '' | ||
| - | These are few examples how its done. | + | The warning is printed like this: |
| + | |||
| + | '' | ||
| + | |||
| + | This means that '' | ||
| + | |||
| + | (In the '' | ||
| + | |||
| + | How do you avoid this warning? It's simple: **don' | ||
| + | |||
| + | |||
| + | ===== 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: | Bad config: | ||
| <code cpp> | <code cpp> | ||
| - | class MGunCore; | + | class MGunCore; |
| - | class MGun: MGunCore | + | class MGun: MGunCore |
| - | { | + | { |
| - | displayName = " | + | displayName = " |
| - | }; | + | }; |
| </ | </ | ||
| + | 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: | Good config: | ||
| <code cpp> | <code cpp> | ||
| - | class MGun; | + | class MGun; |
| - | class TAG_MGun: MGun | + | class TAG_MGun: MGun |
| - | { | + | { |
| - | displayName = " | + | displayName = " |
| - | }; | + | }; |
| </ | </ | ||
| - | Other common errors: | + | ===== Other Common Errors ===== |
| < | < | ||
| Updating base class -> | Updating base class -> | ||
| Line 43: | Line 65: | ||
| </ | </ | ||
| All can be avoided by not touching these base classes, just inheriting 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.1240757380.txt.gz · Last modified: 2009/04/26 14:49 by snakeman
