Save system not working


im getting a error for data.text please help

save system:

using UnityEngine;
using System.Collections;
using System;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using UnityEngine.UI;
public class SaveSystem : MonoBehaviour {
    public static Text charText;
    public static int money;
    public static int cakeMultiplier;
    public static Text TextMoney;
    public static int CakesUpgrades;
    public static Text Cakes;
    public static int DVDSUpgrades;
    public static Text DVDS;
    public static int dvdMultiplier;
    public static int CDSUpgrades;
    public static Text CDS;
    public static int cdsMultiplier;
    public static int VideoGamesUpgrades;
    public static Text VideoGames;
    public static int videogamesMultiplier;
    public void SaveState()
        BinaryFormatter bf = new BinaryFormatter();
        FileStream file = File.Create(Application.persistentDataPath + "/PlayerData.dat");
        PlayerData data = new PlayerData();
        data.text = UIInputField.charText.text; =;
        data.cakeMultiplier = UpgradeCakes.cakeMultiplier;
        data.TextMoney = UpgradeCakes.TextMoney.text;
        data.Cakes = UpgradeCakes.Cakes.text;
        data.CakesUpgrades = UpgradeCakes.CakesUpgrades;
        data.DVDSUpgrades = UpgradeCakes.DVDSUpgrades;
        data.DVDS = UpgradeCakes.DVDS.text;
        data.dvdMultiplier = UpgradeCakes.dvdMultiplier;
        data.CDSUpgrades = UpgradeCakes.CDSUpgrades;
        data.CDS = UpgradeCakes.CDS.text;
        data.cdsMultiplier = UpgradeCakes.cdsMultiplier;
        data.VideoGamesUpgrades = UpgradeCakes.VideoGamesUpgrades;
        data.VideoGames = UpgradeCakes.VideoGames.text;
        data.videogamesMultiplier = UpgradeCakes.videogamesMultiplier;
        bf.Serialize(file, data);
    public void LoadState()
        if(File.Exists(Application.persistentDataPath + "/PlayerData.dat"))
            BinaryFormatter bf = new BinaryFormatter();
            FileStream file = File.Open(Application.persistentDataPath + "/PlayerData.dat", FileMode.Open);
            PlayerData data = (PlayerData) bf.Deserialize(file);
            UIInputField.charText.text = data.text;
            UpgradeCakes.cakeMultiplier = data.cakeMultiplier;
            UpgradeCakes.TextMoney.text = data.TextMoney;
            UpgradeCakes.CakesUpgrades = data.CakesUpgrades;
            UpgradeCakes.Cakes.text = data.Cakes;
            UpgradeCakes.DVDSUpgrades = data.DVDSUpgrades;
            UpgradeCakes.DVDS.text = data.DVDS;
            UpgradeCakes.dvdMultiplier = data.dvdMultiplier;
            UpgradeCakes.CDSUpgrades =  data.CDSUpgrades;
            UpgradeCakes.CDS.text = data.CDS;
            UpgradeCakes.cdsMultiplier = data.cdsMultiplier;
            UpgradeCakes.VideoGamesUpgrades = data.VideoGamesUpgrades;
            UpgradeCakes.VideoGames.text = data.VideoGames;
            UpgradeCakes.videogamesMultiplier = data.videogamesMultiplier;

 class PlayerData
     public string charText;
    public int money;
    public int cakeMultiplier;
    public string TextMoney;
    public int CakesUpgrades;
    public string Cakes;
    public int DVDSUpgrades;
    public string DVDS;
    public int dvdMultiplier;
    public int CDSUpgrades;
    public string CDS;
    public int cdsMultiplier;
    public int VideoGamesUpgrades;
    public string VideoGames;
    public int videogamesMultiplier;


Open your console window so that you can see all the errors and at a minimum copy them (if you do a print screen you will have an image which you will need to save to a file so that you can post it here). As @jgodfrey said you need to include complete error messages when (at run time or compile time) and where they are located (including line numbers - that’s why formatting is important).