you have update declared as
void update()
{
if (itemObject == 0)
{
Debug.Log("Update works");
}
}
that is incorrect it must be capitalized ... casing matters in C# so it should be
void Update()
{
if (itemObject == 0)
{
Debug.Log("Update works");
}
}
Also small note your itemSpawner method should also be capitalized ... in C# the common naming standard is that a method name should always be capitalized can camel cased
Also small note your itemSpawner method should also be capitalized ... in C# the common naming standard is that a method name should always be capitalized can camel cased