This variable holds status (true
or false
) of whether the native extension for NSFS was successfully loaded. The extension may not be loaded in a few cases:
- Extension is not supported on the target platform.
- Extension' file is amiss (e.g. the user did not unzip the game before running).
As per GameMaker rules, all calls to unavailable extensions return 0
instead, so you may want to check this and notify the user prior to performing any operations.
Some functions provide additional feedback aside of usual success/failure result.
In those cases, when the result is false
, this global variable holds the status/error code that can be used for troubleshooting the issue.
On Windows, values are as per System Error Codes reference.
By default, when a relative path is specified, NSFS will read/write files in game's program directory. If you want to use some other directory instead (e.g. save directory), you can use this function to change the extension's working directory.
The function returns whether the working directory was successfully changed; nsfs_status contains the error code if it couldn't be.
One of the few reasons to failure of this function is the target directory not being a valid path (use directory_exists or directory_exists_ns to check).
Returns the extension's working directory.
If that somehow fails, returns an empty string and sets nsfs_status.