RegisterSRScript
From GECK
A function added by the JIP NVSE Plugin.
Contents
Description
Registers a source file to be handled by Script Runner.
The main purpose of this function is to make it possible to register SR script files selectively and conditionally, on game restart.
- This function may only be called from a Game Restart (gr_ prefix) SR script, and will have no effect otherwise.
- The filePath string argument should be the path to the source file, relative to ..\Data\NVSE\plugins\scripts\, and must include at least one subfolder. i.e. The file must be located in a subfolder of ..\scripts\.
- The file name should follow the standard naming convention of SR files - the prefix will determine when the script is executed.
- If successful, the function returns 1. The function will return 0 if:
- The file could not be accessed, or
- The source script failed to compile, or
- A file with the same name was already registered.
Syntax
(successful:0/1) RegisterSRScript filePath:string
Example
RegisterSRScript "my_optional\gl_Option2.txt"