UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#load directive not working with relative paths

DT-is-not-available opened this issue · comments

commented

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

  1. Create a new main.csx file, and paste in the following code:
#load "sub.csx"
ScriptMessage(message);
  1. Create a new sub.csx file in the same folder as the main.csx file, and paste in the following code:
string message = "Hello world!";
  1. 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:

  1. Create a new fix.csx file
  2. Put #load <path> in the file, replacing <path> with the absolute path to the main.csx file in quotes
  3. Run fix.csx through UndertaleModTool, should run fine

Setup Details

I am running UndertaleModTool bleeding edge on Windows 11.