Need Help With Code (can't explain)

Hello,

I am planning to make a sort of farming game just to practice workshop code. I have run into a wall however, and have no ideas to fix a bug. The bug is caused when 2 plants are placed, and you grow 1 to full size. The first one works fine. However, when you grow a second plant, the code thinks it is still the Plant1 and tries to get the array value of 1 for it, but since there is none it sets it to 0 which bugs the inventory.

The game functions fine for 1 max plant, but I don’t want that. Any ideas?
Code: GMHAX (grandmaster hacks lol)

Rules that might have something to do with it: Grow Crop, Harvest Crop