Need help detecting item amount in array

Hold on, sorry to keep asking for help, but i’ve done some further testing and i noticed two things:

  1. I was using a regular variable withing the new function, and as i changed to local variable, i was unable to add 1 to the variable value
  2. Although i put the InventoryStructure variable into the function, got it, broke it, got the class of the item, compared if is child of “can pickup”, and used this as a condition, if i pickup the “log pickup” it still adds 1 to the variable.