Saving to file on Xbox

May 5, 2008 at 10:02 AM
Hi,

I don't know if I'm brain farting here, but my game crashes every time I try to write on the Xbox360. Reading works fine.

My writing code is simply...

config.SettingGroups"Game".Settings"Players".SetValue(amountOfPlayers);
config.Save("config.ini");

Works like a charm on the PC, have I missed something critical? config.ini has been copied to both bin\x86\debug and bin\xbox360\debug
Coordinator
May 14, 2008 at 8:35 AM
The file system on the Xbox doesn't just allow you to write files like that. You have to use the StorageDevice to get a StorageContainer and use that to get a file path to save the file. See this tutorial: http://msdn.microsoft.com/en-us/library/bb203921.aspx.