So I decided to make an inventory using variables, each one has an item ID to determine what it is holding, and an item stack, to see how much of that item it has. But when I was trying to make a system where I could add an item, I could not do it. I kept getting no items at all, all items being replaced, or replacing the only item. Can anyone look into the project and tell me how to do this? Here is how I want it to work, when an item is added, it will find an empty slot, and will be put in there, and it will add one to the stack. Cheers!
PS: If you need more info, please tell me.
PS 2: Here is the source: drive.google.com/file/d/1bhnNIs2Pcv0KQIwFVP1ja3h6X3oGf-yF/view