program_directory

Directory in which the game executable is stored.

Syntax:

program_directory


Returns: String.


Description

This will return the directory where the game executable is stored. However this may not always be useful, particularly as some devices run the exe from a *.zip file, so this would return the same no matter where the game is actually running from.


WARNING! This function may not work as you expect due to GameMaker: Studio being sandboxed! Please see the section on File System Limits for more information.


Example:

dir = program_directory;

This will store the directory where the executable is stored in a variable.


Back: File Handling
Next: base64_encode
© Copyright YoYo Games Ltd. 2018 All Rights Reserved