Gaming
 

Function

From NWNWiki

A function is the top-level grouping of instructions in a script. Instructions must exist inside functions, and no function may be inside another. Functions may, however, invoke other functions by name. Some functions take parameters, and some return a value to the caller.

Execution of most scripts begins with the specially-named function main(), which takes no parameters and returns no value. The only exceptions are the scripts used to determine which lines of dialog appear in a conversation. These scripts begin execution with the specially-named function StartingConditional(), which takes no parameters and returns an integer.