I’m trying to change the value of a member from a struct I have created that contains the teams’ information, but it is not updating when I set it in “Set members in Struct”.
As you can see, it prints the display name correctly from the parameter I’ve passed on, but the same is set in one of the members through Set Members in STeamInfo and prints NULL…
I have already checked if the array’s length is valid.
The node is working as it should. The problem you are having is that the array ‘Get’ does not return a value by reference, so you are essentially setting no variable when using Set Members.
So, following this I have put, manually, some index values inside the Get and printed the “Color” values inside the respective index.
As I set before, the default color values at each index are:
0 - Green
1 - Black
…
It is printing correctly each value at the given index, leaving me to think that the ‘Get’ is working but the Set members in Struct is not…
Avoiding the “Get” node, I have made the following logic, that left me with the same results.
I might be creating a little confusion about this episode, but I’m pretty sure the Set members is not working as it should.
Well, as I was saying before, the Get node does not return a value by reference, nor does the ArrayElement pin on ForEachLoop. SetMembers is setting nothing but a plain value, and it outputting the value that it was unable to set.