View Single Post
Old 11-25-2003, 03:46 PM   #3
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
Quote:
Originally posted by dominions:
Second question: How do you compile include files? So far I've had to save my standard Champion of Krynn scripts into a file called 'COK_ROUTINES' and compile it as a conditional script using the conversation editer.
What do you mean by how to compile them? I think writing the script and saving is enough. I seem to remember that it didn't work as normal scripts but you just could use the files when you saved them.

I've found it in the NWNLexicon:

Quote:
#include

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, a #include does not have a ending semicolon.

#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.

Note: if you attempt to comment out a #include with a multiline comment ("/*" and "*/"), the compiler still attempts to include the specified file. Use the single line comment ("//") instead.
philip is offline   Reply With Quote