#ifdef name
#ifndef name
#else
#endif
Defined names can be used to to skip certain script lines dependent on previous #defines.
All script lines between #ifdef and #endif are
skipped if name was not defined. Likewise,
all lines between #ifndef and #endif are
skipped if name was #defined. The #else statement
reverses the line skipping or non-skipping.
Remarks
-
#defines and #ifdef lines are ignored within engine objects definitions, such as PANEL*, MATERIAL* etc. If you want to have different engine object parameters dependent on #define statements, define several separate objects and select them through #ifdef.
Example:
#define LOW_RES
...
#ifndef LOW_RES
video_mode = 8; // 1024x768
#else
video_mode = 6; // 640x480
#endif
See also:
#define
► latest
version online