...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var returnValue = include("path/filename.js"); |
Parameters
Parameter | Type | Mandatory | Description | Game verison |
---|---|---|---|---|
"path/filename" | String | The name of the file to include. If it's in a different folder, include the relative path?path to the file that should be included. The path starts at your mod folder. For example, if you're writing an AI script and want to include a "whatever.js" script that's stored in the same folder as your AI script, you'd specify:
Even though whatever.js is in the same folder as your AI script, you still need to specify the path to it! | 3.1 Beta 1 |
Return value
In version 3.1 Beta 2 and earlier, this function would return undefined
if the file was successfully loaded, however undefined
is treated as false
in an if
statement, and false
is the return value used to indicate the file failing to load!
...