I would like to create a counter for an item when i already have one in the inventory and get more of them. The thing i am trying to do is to check if in my inventory there is an item with the same name of the one i’m taking and if it is true add 1 to the counter.
I tried to put an item in a specific slot (index 0) and checking if in the index 0 there was the item but it seemed not to be seen cause the branch still got false result.
How can i check if there is an item with that name in every inventory slot (so in every index of the inventory)?
This is how i am trying to check if the item is already in the inventory:
This is my inventory (hud):