I'm trying to make a button that instantiates an item when you craft it

public int needsAmount;
public GameObject needs;
public GameObject craftedItem;
public GameObject player;
public Vector2 spawnPoint;
public void craft()
{
for (int i = 0; i > needs.Length; i++)
{
for(int j = 0; j > player.GetComponent().inventory.Length; j++)
{
if(player.GetComponent().inventory[j].GetComponent().id == needs*.GetComponent().id &&*
player.GetComponent().inventory[j].GetComponent().quantity >= needsAmount*)*
{
player.GetComponent().inventory[j].GetComponent().quantity -= needsAmount*;*
Instantiate(craftedItem, spawnPoint, transform.rotation);
}
}
}
}

I’m comparing 3 lists of objects, one with the items needed for the craft and other with the amount of that item needed. The other list is the inventory of the player, it has to check if the item id is the same, and if you have enough quantity of that item. I don’t really get why it’s not working