#include

From NWN Lexicon

This declaration is used to load any external code libraries that might be needed by a script (any other *.nss file). It needs to be placed above any code that uses the functions which will be loaded, but it is generally good practice to place #include directives at the top of a script before any code.

#include statements have only the file's name, surrounded by text qualifiers (double quote characters), without the file extension.

Since it is a compiler directive and not an actual code statement, an #include does not have a ending semicolon.

// top of script
#include "nw_i0_generic"

Previously compiled scripts that use the recompiled include will need to be recompiled as well before showing changes.

From the Toolset, Build > Build Module is a quick way to recompile multiple scripts in this situation.


 author: Ryan Hunt, editor: Lilac Soul, additional contributor(s): Lilac Soul

Personal tools
Categories