User Tools

Site Tools


arma:config_formatting

Differences

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

Link to this comparison view

arma:config_formatting [2009-09-03 06:54]
arma:config_formatting [2009-09-03 06:54] (current)
Line 1: Line 1:
 +====== Config Formatting ======
  
 +**Config Formatting**
 +
 +Configs can be quite intimidating to newbies and hard to read even for oldschool guys if they are written poorly. There is more addons written with poor format than with good ones, some are so hideous that it makes you just want to cry.
 +
 +Examples of right and wrong config formatting.
 +
 +Wrong:
 +<code cpp>
 + magazines[] = {"​VTE_FlareWhite_Rifle","​VTE_FlareGreen_Rifle","​VTE_FlareRed_Rifle","​VTE_FlareYellow_Rifle"​};​
 +</​code>​
 +
 +Right:
 +<code cpp>
 + magazines[] =
 + {
 + "​VTE_FlareWhite_Rifle",​
 + "​VTE_FlareGreen_Rifle",​
 + "​VTE_FlareRed_Rifle",​
 + "​VTE_FlareYellow_Rifle"​
 + };
 +</​code>​
 +
 +As you can see we use TAB intend after each { character and after classes. This makes very easy to read configs.
 +
 +
 +====== Notes ======
 +
 +For complete newbies; in reality it doesn'​t matter which way its formatted for ArmA, however we are humans, not ArmA engine... when we edit the config files it matters to US if it looks nice or looks like computer cipher. So if you are a newbie, learn it from the start to write beautiful config format so its easy to read for everyone and especially for you.
 +
 +Can you imagine that you actually learn faster to write configs when you write them with proper intend. Weird huh.
arma/config_formatting.txt ยท Last modified: 2009-09-03 06:54 (external edit)