ofp:tools:cfgcheck
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ofp:tools:cfgcheck [2007/07/10 09:52] – external edit 127.0.0.1 | ofp:tools:cfgcheck [2024/07/31 16:50] (current) – links added. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== CfgCheck ====== | + | ====== |
+ | |||
+ | [[https:// | ||
+ | |||
+ | **Operation Flashpoint (OFP)** aka ArmA: Cold War Assault (CWA) | ||
CfgCheck checks OFP configs for syntactic errors and a simple semantic check (double entries). | CfgCheck checks OFP configs for syntactic errors and a simple semantic check (double entries). | ||
Line 25: | Line 29: | ||
**Command Line Parameters** | **Command Line Parameters** | ||
- | * cpponly: runs the file only through the preprocessor (excludes -nocpp) | + | * cpponly: runs the file only through the preprocessor (excludes -nocpp) |
- | * nocpp: doesn' | + | * nocpp: doesn' |
* b: beautifies the input file | * b: beautifies the input file | ||
* o OUTFILE: output from -cpponly or -b goes into OUTFILE | * o OUTFILE: output from -cpponly or -b goes into OUTFILE | ||
Line 47: | Line 51: | ||
**Macros** | **Macros** | ||
- | There are basically three types of macros: Valueless macros, simple macros, macros with arguments. | + | There are basically three types of macros: Valueless macros, simple macros, macros with arguments. |
Valueless macros are of the form: | Valueless macros are of the form: | ||
Line 94: | Line 98: | ||
**Predefined Macros** | **Predefined Macros** | ||
- | CfgCheck predefines right now exactly one macro: __CFGCHECK__ - that is two underlines followed by CFGCHECK (case sensitive!) followed by two underlines. | + | CfgCheck predefines right now exactly one macro: __CFGCHECK__ - that is two underlines followed by CFGCHECK (case sensitive!) followed by two underlines. |
You can use this to hide sections from OFP, or vice versa (use #ifdef and #ifndef). This can be useful when using #include, as CfgCheck interprets #include in a special manner. One example is, you are using #include to separate parts of the config into different files. When running CfgCheck on the config.cpp, you'll get probably an error (file not found) or you will be scanning the included files in the PBO in your addons-directory instead of the local file. Here you use the following workaround: | You can use this to hide sections from OFP, or vice versa (use #ifdef and #ifndef). This can be useful when using #include, as CfgCheck interprets #include in a special manner. One example is, you are using #include to separate parts of the config into different files. When running CfgCheck on the config.cpp, you'll get probably an error (file not found) or you will be scanning the included files in the PBO in your addons-directory instead of the local file. Here you use the following workaround: | ||
Line 123: | Line 127: | ||
</ | </ | ||
- | I don't think OFP makes a difference between the two, but I think it is better to make a difference. You'll see the former in the commented config. So if you're writing a Mod config, then use the former; if you want to include from somewhere of the OFP directory or from a PBO, then use the latter. | + | I don't think OFP makes a difference between the two, but I think it is better to make a difference. You'll see the former in the commented config. So if you're writing a Mod config, then use the former; if you want to include from somewhere of the OFP directory or from a PBO, then use the latter. |
< | < | ||
Line 135: | Line 139: | ||
====== Bugs and Info ====== | ====== Bugs and Info ====== | ||
- | **Bugs and other information** | + | **Bugs and other information** |
OFP allows variable definitions like this: | OFP allows variable definitions like this: | ||
Line 153: | Line 157: | ||
This is clear. | This is clear. | ||
- | OFP allows to omit the semicolon ';' | + | OFP allows to omit the semicolon ';' |
CfgCheck only supports UTF-8 character encoding, if you get an UTF8 error, then you have three possibilities: | CfgCheck only supports UTF-8 character encoding, if you get an UTF8 error, then you have three possibilities: | ||
Line 177: | Line 181: | ||
**Author**: | **Author**: | ||
- | vektorboson (Lukas Pinkowski), vektorboson@gmx.de | + | vektorboson (Lukas Pinkowski), vektorboson@gmx.de |
**Credits**: | **Credits**: | ||
Line 183: | Line 187: | ||
Download from [[http:// | Download from [[http:// | ||
+ |
ofp/tools/cfgcheck.1184061152.txt.gz · Last modified: 2007/07/10 09:52 by 127.0.0.1