Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

I need some help fixing some code

$
0
0
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 () } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>