working_directory, program_directory, and temp_directory GMStudio compliance [u524]

Reporter: time-killer-games  |  Status: open  |  Last Modified: October 06, 2017, 01:53:12 AM

For the default compliance mode, (GMStudio compatibility), working_directory, program_directory, and temp_directory need to include the final slash at the end of the string they return. Nocturne on the GMC said that program_directory and temp_directory do not include that slash due to a bug in GMStudio, and that it should include the final slash like working directory does.

Long story short:

In GM 8.1 and below compliance mode - there should be no slash at the end for these 3 constants.
In GMStudio 1.x and above compliance mode - there should be a slash at the end for these 3 constants.

temp_directory also seems to not be fully implemented, because whenever I use it, even though LGM gives it syntax highlighting as if it were implemented, it throws and error saying the value of the constant is undefined.

There's also a new directory constant in GMStudio called "game_save_id" - this still needs to be implemented into ENIGMA - it's GMStudio's sandbox directory. game_save_id includes the final slash and in GM 8.1 and below compliance this constant shouldn't be declared. Only declare/implement it in GMStudio 1.x and above compliance.

ENIGMA was originally based on GM 8.1 and below - so it makes sense why the last slash isn't there, because that's how GameMaker originally worked.

This is actually not that big of a deal, just go ahead and add / anyway. Ideally you should be using / because those will work on Linux and Mac as well as Windows.

For example, I ran this just fine in command prompt:

C:\>cd C:///Users///Owner////Desktop


C:\>cd C:\\\Users////Owner\\/Desktop


Just go ahead and add one anyway because even if it is there it won't break.

Please sign in to post comments, or you can view this issue on GitHub.