Only assignment, call, increment, decrement, await, and new object expressions can be used as a stat

Can someone help show me how to fix these errors?

using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;

public class Functions : MonoBehaviour {

    public int wins = 0;
    public int RandomValue = 0;
    public int TimesPlayed;
    public int TotalEarnings = 0;
    public float WinAverage = 0;
    public float WinPercentage = 0;
    public Button Button1;
    public Button Button2;
    public Button Button3;
    public Text GamesPlayed;
    public Text WinPercent;
    public Text WinAve;


    // Use this for initialization
    void Start () {
        GamesPlayed.text = "0";
        WinPercent.text = "0";
        WinAve.text = "0";   
    }
   
    // Update is called once per frame
    void Update () {
       
    }
    public void Play()
    {
        GenerateRandom;
        TimesPlayed;
        PrizeWon;
        CalculateAverages;
        GamesPlayed.text = TimesPlayed.ToString();
        WinPercent.text = WinPercentage.ToString();
        WinAve.text = WinAverage.ToString();
    }
    public void GenerateRandom()
    {
        RandomValue = Random.Range(1,11); //10
    }
    void WonGame()
    {
        wins += 1;
    }
    void GamePlayed()
    {
        TimesPlayed += 1;
    }
    void PrizeWon()
    {
        TotalEarnings += 2;
    }
    void CalculateAverages()
    {
        WinPercentage = wins / TimesPlayed;
        WinAverage = TotalEarnings/TimesPlayed;
    }
       
       
}

You have things like:
PrizeWon;
when you need: PrizeWon();

1 Like