R
rinkuhero
Guest
when using a while loop and file_find_next() and the working_directory to make a list of files in a directory, what i expect would happen, due to gm: studio's sandboxing, is that it would make a list of both possible working_directory locations (the "save folder" and the "program bundle"), and that file_find_next() would cycle through both directories.
what i'm using that for is custom levels that are included with the game, which are stored in the 'program bundle' (install directory) in [game's install directory]/data/custom/, and the custom levels that a player themselves make, which are stored in users/username/appdata/local/idefense/data/custom. both of those should be equivalent to working_directory/data/custom, and i see the files are correct in both, i just can't seem to read through the former using file_find_next() to get a list of its contents.
so basically, my issue is, it should be possible to make a list of the complete contents of both of those directories using file_find_next() on the working_directory, so that i could find all of the levels that are both included with the game, and created by the player, but, what's happening is, file_find_next() seems to only check the program bundle files, not the appdata files / save folder.
is this a bug? because i seem to recall file_find_next() working on both in the past with my game, but lately, it doesn't seem to detect anything saved in the save area, only the program bundle area. is there any way to fix this?
(this is for my game on steam, immortal defense, which now no longer is able to detect the existence of custom levels that user creates and saves in the save directory, when it used to work fine with the same code, around 2016. the only thing that changed is an update to newer version of gm studio, currently v1.4.1763)
what i'm using that for is custom levels that are included with the game, which are stored in the 'program bundle' (install directory) in [game's install directory]/data/custom/, and the custom levels that a player themselves make, which are stored in users/username/appdata/local/idefense/data/custom. both of those should be equivalent to working_directory/data/custom, and i see the files are correct in both, i just can't seem to read through the former using file_find_next() to get a list of its contents.
so basically, my issue is, it should be possible to make a list of the complete contents of both of those directories using file_find_next() on the working_directory, so that i could find all of the levels that are both included with the game, and created by the player, but, what's happening is, file_find_next() seems to only check the program bundle files, not the appdata files / save folder.
is this a bug? because i seem to recall file_find_next() working on both in the past with my game, but lately, it doesn't seem to detect anything saved in the save area, only the program bundle area. is there any way to fix this?
(this is for my game on steam, immortal defense, which now no longer is able to detect the existence of custom levels that user creates and saves in the save directory, when it used to work fine with the same code, around 2016. the only thing that changed is an update to newer version of gm studio, currently v1.4.1763)