Check the documentation............................
You have to specify *.* at the end of the directory to list all files in it.





Check the documentation............................
You have to specify *.* at the end of the directory to list all files in it.









Hi Gibbon. Where are you saving it to? Where are you loading it from? Is it being saved to and from the game folder itself? I have vista, and saving and loading from the location of the game works ok.
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm








Looki... that will be it then (without checking) Cheers
nivram, i wasnt saving or loading files, i wast trying to get the list of files within a folder.
Cheers
Andy









Oh,sorry about that Gibbon. Gray matter drip.
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm




I have had some issues in the past getting this to work. The easiest way is to use Sphax File Folder Object and add the items into the list that way.Originally Posted by Gibbon
stephen1980






So I got a question i just want to clarify. I'm having issues with Vista. My game is installed under program files -> game folder but even having it set as administrator, when the game is run in fullscreen it starts to flicker, and has issue creating the files needed under it's own game folder.
Reading the documentation, if the game is installed outside of program files, lets say in it's own folder like c:\my game and run the game as invoker, would that problem happen? Or would it be able to create files under c:\my game\data for example?
OR should I just make it run as administrator instead of Invoker?
Thanks for the help.
Regards!
Renato

After apps are installed (using administrator priveleges) they cannot write to the Program Files folder any more (unless runned as administrator).
If your game needs additional files, why not put them in the installation? Or if they are temporary, then please put them in this folder: %TEMP%
(it resolves to some folder, either C:\Windows\Temp or your user-designated temp folder)
Otherwise if it is some save-games or something similar, you need to store them in the current user folder. Maybe App Data, not really sure.
As you can imagine it is not that simple to simply store files anymore. It has always been like this in Linux environments because of the more developed multi-user paradigm. Windows started out as a single-user operating system and that gave many programmers bad programming styles. On windows xp it was still possible to store files along with the dynamic data as the default user (because the default user was an administrator account)
You better get used to the clear separation of executables and "dynamic" data files as it doesn't look like it's going away.






I see. So I think to fix some of the issues, I should install the game under C:\MyGame, that way it isn't in program files anymore.
For the save files, I have it save to for example c:\mygame\data (is that bad?). Will I run into trouble with that?
Third. Some quick temp files are created, still under c:\mygame\system. Is that alright? So that way I am not writting to c:\windows at all.
Thanks for the clarification Andos

You can do that, that will work, but in this case you have to lock the install directory in the installer so that the user cannot modify it. Because if they change it to Program Files\Yourgame, then your game won't work.
The best solution is to write your files in a sub-directory of the Application Data directory. Just retrieve the path of this directory with the "Application Data Directory" expression of the File object, create a sub-directory in this directory and then save your files in this folder. That's really easy to do.

Yes, saving your game to C:\MyGame\ is a really really bad idea.