incremental game not adding automatic gold per tick

hello I am making an incremental game but it is not adding the gold after each second even after buying the items, heres my code:

using UnityEngine;
using System.Collections;

public class GoldPerSec : MonoBehaviour {

    public UnityEngine.UI.Text gpsDisplay;   
    public Click1 click;
    public ItemManager[]items;

   void start (){
        StartCoroutine (AutoTick ());
   

    }

    void Update(){
        gpsDisplay.text = GetGoldPerSec () + "gold/sec";

    }

    public int GetGoldPerSec(){
        int tick = 0;
        foreach(ItemManager item in items) {
            tick += item.count * item.tickValue;

        }
        return tick;

    }
   

    public void AutoGoldPerSec(){

    }

    IEnumerator AutoTick(){
        while(true) {
            AutoGoldPerSec();
            yield return new WaitForSeconds(1);

        }

    }
}
using UnityEngine;
using System.Collections;

public class ItemManager : MonoBehaviour {

    public UnityEngine.UI.Text itemInfo;
    public Click1 click;
    public float cost;
    public int tickValue;
    public int count;
    public string itemName;
    private float baseCost;

    void start(){
        baseCost = cost;

    }

    void Update(){
        itemInfo.text = itemName + "\nCost: " + cost + "\nGold " + tickValue + "/s";

}

    public void PurchasedItem(){
        if (click.gold >= cost)
            click.gold -= cost;
            count +=1;
            cost = Mathf.Round (baseCost * Mathf.Pow (1.15f, count));
    }

}

This might seem overly obvious, so it’s possible I’m missing something, but… AutoGoldPerSec() is empty…

its meant to be like that :I

So, in what function does your script add gold then?

you can buy things which automatically gain gold for you instead of you having to click to mine yourself

and it gives an amount of gold to be added per tick, but its not working

…I think we are having some fundamental communication disconnect here, because as far as I can determine the answer is, like incredibly obvious: You need to actually put some gold-adding code into AutoGoldPerSec(), otherwise it’s obviously not going to increment your gold each second.

…are you saying that GetGoldPerSec() is returning 0 when it shouldn’t be? I’ve been reading this:

But were you trying to say this?

yeah its meant to do the second thing

OK. So now we’re talking about the same thing.

My first thought: Is the items array empty?

Second thought: what are the “count” and “tickValue” of each item in the items array?

In either case, putting this inside your for loop should help clarify what’s happening (or not happening):

Debug.Log(item.itemName + "; Count:"+item.count+"; tickValue"+item.tickValue);