im trying to save the variables of level in xml file ,using cs scripts 1->>so that if the player exits from the game , if he logs in again , it tries to load the recent level
2->>and activates the menu icons in choose levels Menu based on the variable in xml file
but it looks iphone is not allowing to access the files i'm using the filestrams and system.xml the code follows as below.
FileStream fs= new
FileStream("/newxml.xml",FileMode.Open,FileAccess.ReadWrite,FileShare.ReadWrite);
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(fs);
XmlNodeList xmlnode = xmldoc.GetElementsByTagName("game");
xmlnode[0].ChildNodes.Item(1).InnerText = "1";
print(xmlnode[0].ChildNodes.Item(1).InnerText);
FileStream fs2 = new FileStream(Application.dataPath+"/newxml.xml" ,FileMode.Truncate,FileAccess.ReadWrite,
FileShare.ReadWrite);
xmldoc.Save(fs2);
fs2.Close();
fs.Close();
also please tell me if i could save to iphone's local documents , like ones in user folder in windows systems.