• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code [Windows] How to access a created file from another game's Local Data

S

SavvyDev06

Guest
I have made two applications which link with each other using 2 text files they create by themselves on start. Each application creates one text file, and the other reads it.
The applications run fine and are able to read each other's text files on Mac, but when I exported it on Windows, the directory it saves the data is different from Mac. It is: C:\Users\(My username)\AppData\Local\Dave_s_PC\"saveData.txt" (The 'Dave_s_PC' file is the name of one of the apps)
However, in Windows, when the other application tries to find the file using: if (file_exists("saveData.txt"))
it can't find it, because it looks in the local files of only itself. (I think so)
Could you please tell me if there is a way of reading the other application's file in Windows, or can I do something else to fix that?
Thank you!
 
S

SavvyDev06

Guest
If you open the open dialog and point to that file you should be able to read it. But you need to do that every time the game starts.


Or use an extension that breaks the Sandbox mode.
Firstly, I would like to thank you for helping me out!
Is there any other way instead of opening the open dialogue, e.g. to be able to create a directory or a folder in the game, or to specify to the game the exact path in which it can find the file in without using the open dialogue box using code?
 
Top