Hello everyone, I am having a problem when passing my inventory content array from one function to another, I have a function that, depending on which inventory is empty, returns that inventory to be able to use it in the add new item function, when I use the available content variable and add the item, it never ends up being added to that inventory, however if I place the reference directly from the component variable it works, I hope you can help me, thanks and sorry for my English
This is find empty slot function, that selects the inventory array where the item will go
This is the function of adding the item, which, as I said, if I place the content variable that comes from the find slot function, the item is never added, but if I drag, for example, the main content or second, the item will be added.
Yes the ItemID variable is the entry node, then I have already solved the loop by setting it to enter the second loop just as it completes the first. but I still have the same problem.
Below I put a video so you can see the behavior, if I select the content that comes from the function it does not add the item, however if I place the variable directly it works.
You’re right!! I just saw it. You cannot pass an array reference, too bad.
I will then have to incorporate several functions in it to be able to access