- Timestamp:
- Aug 30, 2014, 8:08:25 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs
r144 r146 45 45 { 46 46 if (File.Exists (StaticDirectories.GetSaveGameDir () + "/AllocsPeristentData.bin")) { 47 PersistentContainer obj; 48 Stream stream = File.Open (StaticDirectories.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Open); 49 BinaryFormatter bFormatter = new BinaryFormatter (); 50 obj = (PersistentContainer)bFormatter.Deserialize (stream); 51 stream.Close (); 52 instance = obj; 53 return true; 54 } else 55 return false; 47 try { 48 PersistentContainer obj; 49 Stream stream = File.Open (StaticDirectories.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Open); 50 BinaryFormatter bFormatter = new BinaryFormatter (); 51 obj = (PersistentContainer)bFormatter.Deserialize (stream); 52 stream.Close (); 53 instance = obj; 54 return true; 55 } catch (Exception e) { 56 Log.Out ("Exception in PersistentContainer.Load: " + e.Message); 57 } 58 } 59 return false; 56 60 } 57 61
Note:
See TracChangeset
for help on using the changeset viewer.