I sent you the capx of my whole project as a PM. The game is in space so you have to go to the planet next to the start and the ship will automatically land there
. Then you leave the ship with F. There is a piece of wood on the planet and everytime you go over it, it adds 1 more wood to the inventory. With Tab you can open the Inventory and when pressing E and standing in front of the chest (the blocky thing on the planet) you can open it. The swap works for the first time I think. But when you try to swap it again, only the amount shows up and everything messes up. In the array it shows NaN (Not a Number?).
Sorry if my project is a little messy.