Two identical arrays, one is empty in game

Hi

I’ve been on this for a couple of days and I haven’t been able to solve it. I’m hoping somebody can help.

The problem: I have two arrays that I use to populate a struct ‘Array1’ and ‘Array2’ in the screenshot below. Both arrays are populated with values. When I start my game and the round begins the first array holds its values, but the second array empties.

I have searched ‘Find References’ and there is nowhere in my blueprints that would delete the contents of either array. I DO destroy the character at the end of the round, and re-spawn/re-possess it - but if this was the problem then I would expect the same issue to happen to Array1.

The screenshot below comes off my ‘Event Begin Play’. It also shows the content of Array 2 on the right hand side.

Can anybody help me solve why the second array is becoming empty?

Thanks in advance!

When I start my game and the round
begins the first array holds its
values, but the second array empties.

Just to clarify. Its size becomes 0 or its elements’ values are set to 0?

and there is nowhere in my blueprints
that would delete the contents of
either array

Perhaps it’s not about deleting but replacing it? What are the chances of this?

Thanks for the quick response!

I’ve just checked and the length becomes 0.

The only items returned from ‘Find References’ is a single ‘GET’ node.

I will keep exploring the ‘replacing’ possibility you mentioned.

did you try find in all blueprints?

Hi Harry - thanks for the tip. I’ve now done this, but it didn’t return anything.

I’ve duplicated the array, deleted the previous one, and named them identically, and this now works.

I’m wondering if this was just an obscure bug?

I’m not able to replicate the issue, so I’m afraid I can’t explain why this worked.

@everynone @harryhighdef thank you both for replying so quickly - I really appreciate it.

Sounds like a quirk, yeah.