With this code i am working with and it says there is an error in line 26, symbol 17 and in line 28 symbol 1. can anyone tell what errors if any there are and how to fix them.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
public static class SaveLoad {
public static List savedGames = new List ();
public static void save() {
savedgames.Add (Game.current);
BinaryFormatter bf = new BinaryFormatter ();
FileStream file = File.Create (Application.persistentDataPath + "/savedGames.gd");
bf.Serialize (file, SaveLoad.ASP);
file.Close ();
}
public static void Load() {
if(File.Exist(Application.persistentDataPath + "/savedGames.gd"))
{
BinaryFormatter bf = new BinaryFormatter();
FileStream file = File.Open (Application.persistentDataPath + "/savedGames.gd", Filemode.Open);
SaveLoad.ASP = (List)bf.Deserialize(file);
file.Close ()
}
}
}
↧