I'm not that good with arrays, but I've been trying to fix this for hours now and I'm stuck. Any help would be greatly appreciated.
I made a video showing the bugs found here:
Bug 1: When the inventory sprite is visible, left clicking on an Inventory Slot removes the item and item amount from the array, and then it puts the item amount into Player.HandAmount and creates a new GroundItem instance, pins it the to mouse and it's frame is set from the Inventory Slot. Then when clicking on an inv slot while you have something in your hand it switches the items and values, but something is wrong with the amount displays in Hand and Inv. Slot.
Bug 2: When items are switched, and then switched again, RMB anywhere packs it back into the inventory. But, when you switch it normally and then RMB, it just adds the dropped amount into the other inventory slot.
download project: ufile.io/6gnj2