#load directive not working with relative paths
DT-is-not-available opened this issue · comments
Describe the bug
The C# script #load
directive does not seem to be able to find files correctly in scripts unless those scripts were loaded with said directive.
Reproducing steps
- Create a new
main.csx
file, and paste in the following code:
#load "sub.csx"
ScriptMessage(message);
- Create a new
sub.csx
file in the same folder as themain.csx
file, and paste in the following code:
string message = "Hello world!";
- Run
main.csx
through UndertaleModTool (expected result should be a message box that says "Hello world!", instead it should error saying it was unable to find the file)
In order for #load
to start working properly, the script must be loaded from #load
using an absolute path, testing this is as follows:
- Create a new
fix.csx
file - Put
#load <path>
in the file, replacing<path>
with the absolute path to themain.csx
file in quotes - Run
fix.csx
through UndertaleModTool, should run fine
Setup Details
I am running UndertaleModTool bleeding edge on Windows 11.