'FIND' function not finding empty index for Inventory

Hello Everyone,

So I have been following the Ryan Laley tutorials on YouTube guided towards building an inventory system.

After ending video 6, my Create Stack function is not working properly. It is supposed to find an empty index, and place the item there. But picking up another item does not stack or add it to the inventory, nor does the inventory function as if there is more than one item.

It was suggested to replace FIND with FOR LOOP w BREAK, but I’m not sure how to do that. Ive attached a few screenshots for you to see. PLEASE HELP, this has been driving me crazy for days!

In this pic, here is my original structure:

In this pic, here is me adding the For Break loop, but too noobish to know what to connect or add. Pleaseeee help

I took a very quick look at the utube channel, there’s a whole series on inventory, so… I haven’t watched it.

There’s a problem with your code in the first pic. You made a slot structure, but the item and quantity are both empty. So you’re looking for an empty slot structure. Unless you specifically make your array to contain ( say ) 20 empty slots, this search will always fail.

If you’re trying to add, for instance, the shotgun for this first time, then you would need to use the array ADD node.

Where did you get the loop concept from? Surely the idea is to just make this tutorial stuff work?

Hey,

The YouTuber actually responded to me in a Unreal FB group and actually posted a fix for this a few days before I had the actual problem! Thanks for trying to help though.