DModule/Defines

From DevDracoBlue

Jump to: navigation, search
DModule-DocsDownloadProjectsCoding StyleAPIValuesDefinesModulesTutorialCommandline

Implementing defines

If you want to use values, you need to define a line in modname.defines.txt for your module.

For example:

EMOTE_COLOR=0xFFFFAAAA

will define a new define with the value 0xFFFFAAAA. Quite equivalent to #define EMOTE_COLOR 0xFFFFFFAA in normal pawn.

Overwriting defines for projects

The reason, why you should use dmodule-defines for specific definitions instead of normal pawn defines is, that you can overload them project based.

So for example the EMOTE_COLOR which is defined by the module modname should be different in your project myproject you define the following:

EMOTE_COLOR=0xFF0000AA

in the file myproject/cfg/modname.txt

Personal tools
In other languages