So basically I am trying to implement an inventory system to my game, by following this tutorial But when I get to the part where you add items into the inventory there is some kind of error that I don't understand here are the scripts that it mentions: Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "New Inventory", menuName = "Inventory System/Inventory")] public class invnetoryObjects : ScriptableObject { public List<InventorySlot> Container = new List<InventorySlot>(); public void AddItem(ItemObject _item, int _amount) { bool hasItem = false; for (int i = 0; 1 < Container.Count; i++) { if(Container[i].item == _item) { Container[i].AddAmount(_amount); hasItem = true; break; } } if (!hasItem) { Container.Add(new InventorySlot(_item, _amount)); } } } [System.Serializable] public class InventorySlot { public ItemObject item; public int amount; public InventorySlot(ItemObject _item, int _amount) { item = _item; amount = _amount; } public void AddAmount(int value) { amount += value; } } and Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; public class Enteractable : MonoBehaviour { public ItemObject item; public int Amount = 20; public float helth = 3f; public bool DestroyAfterUse = false; public GameObject Player; public invnetoryObjects Pinventory; void Update() { if (helth <= 0) { Pinventory.AddItem(item, Amount); if (DestroyAfterUse) { Destroy(gameObject); } } } }