Thanks for the reply's

I create and write the files into the same folder that the game is in. If the player downloaded the zipped folder then they can place it anywhere they want. If the player downloaded the installer and had the game installed to their computer under the default settings then a folder is created in program files and that is where the exported level files would be saved to.

You got me thinking and I ran some tests. I found that the error only occurs in the installed version of the game and not the zipped folder. So I took the zipped folder and moved it to the same location as the installed version in program files. Just creating the new folder I had to give permission. And sure enough the error occurred.

So clearly the problem is with the location of the folder. That still leaves me with a problem. I could simply warn the user with a message and save the game before I even attempt to export the files.

Something like this maybe "If Exporting a level crashes the game then run the game as an administrator."
If anyone knows a way to fix this or to at least prevent the crash please let me know. Thanks again.

@dice
My problem is that my game exports a game level so that the user can send it to friends or save it. This requires me to create a new file with a unique name based on the level. This is where the error occurs when I create a new file. I have no problem writing or reading a file.

My point is that your game (I assume) creates a file based on the players name to store the save data. If you create one save file then store all of the data in that save file then you could avoid the error. I hope this helps.


Mikes Wicked Games

www.mikeswickedgames.com