Preprocessing

Before the compilation the script is preprocessed. You can place some directives, that change the default code. There are currenltly two directives : aliases and includes. All preprocessor directives starts with # sign.

Aliases

Aliases allow to change some text to other (basic C++ #define functionality). You can define some symbols that are subsituted at preprocessing time.

Alias is defined with #alias command. The first argument is a word to be replaced, the second one is a word that replaces the first one.

   ...
   #alias MAX_HEALTH 100
   if(health < MAX_HEALTH)
      SearchForMedkit();
   ...   

Includes

Include directive allow to insert some script in the place of the instruction. The file may be included only once. It is done automaticly. The include path is the path of the file that contains the directive.

Let common.sc file contain:

   ...
   #alias MAX_HEALTH 100
   ...   

The main file that includes common.sc

   ...
   #include "common.sc"
   if(health < MAX_HEALTH)
      SearchForMedkit();
   ...