AGS has functions that let you read and write from files in the game's default folder. According to the manual, these might not work in vista because the user might not have access there? I don't personally run vista (I have win7) but perhaps someone has experience with this, or perhaps this is also an issue on other OS's? What I'm basically trying to do is keep a high score table in a "hiscore.dat" file that I'm creating myself, so I'd need read and write access to it.
I used Vista several years ago, and as far as I remember, it could be a bitch when it comes to access rights.
Anyway, as manual states, you can use following tags in the file path:
Quote
$SAVEGAMEDIR$, which allows you to access files in the save game directory.
$APPDATADIR$, which allows you to write/read files to a folder on the system which is accessible by and shared by all users
For example:
File.Open("$SAVEGAMEDIR$/hiscore.dat", eFileWrite);
I believe that should assure that the file will be properly created in Vista and Win7. At least AGS 3.* savedgames are saved properly on Vista, so other files might too.
Thanks. A related question, would FillDirList("*.tra") still work under Vista to enumerate a game's translations? That would require only read access to the directory, I suppose.
This was the reason that CJ had to make the save game directory default to the Documents directory ("My Documents" on XP, "C:\User\Username\Documents" on Vista and 7). Note that if you ever use Game.SetSaveGameDirectory and don't use the $MYDOCUMENTS$ tag (or whatever it's called) then you could run into the same problem.
AFAIK, reading existing files from the game's directory shouldn't be problematic though. Vista was pretty insane about permissions (7 throttled it back, but is still absurdly restrictive by default).