i have been looking for a solution for 2 hours now, i hope some of you guys can help me.
the error message:
NullReferenceException: Object reference not set to an instance of an object Item.Start () (at Assets/Scripts/Inventory System/Item.js:9)
here’s my script:
#pragma strict
var objectName : String;
var amount = 1;
function Start () {
objectName = gameObject.name;
transform.Find("Player").GetComponent(InventoryMemory).InvUpdate(objectName, amount);
}
function Update () {
}