Problem With Struct Not Saving Information

Thanks for reading.
Currently I am making a project that which I would like to use Structs to save an array of information such as the Players and settings.

At the moment I am able to product the results I would like within One Widget but I set the widget to Hidden or Remove from Partner it removes all the information I have added to the array??

Please follow the link below to show you a Video uploaded on Youtube:-

As you can see I have for the moment for testing set one of the buttons to add information in to the Struct and when I click Players it displays as expected. I am simply Referencing the Struct as an Array and using the Add Node to add the information.

Please let me know if I am doing something wrong or if there is an issue to the Structs not holding the information in 4.18 as I have been using this system on 4.15 without issue, I don’t really want to start again using 4.15 when I have created a lot of the widget layouts required already.

The video is unavailable. When you work with a struct array, set the data inside like this:

Select the SetMembers node and enable pins in the details panel. The pins you do not enable remain unaltered.

Hi,
Thank you for your reply. I have made the video Public now (Sorry) to view.

tried to follow the details above but i still unable to get the struct to save the details after the window has been closed.

Please find a new video uploaded trying many different things to try to get the Player List to save (Noting need the array to be ref later).

I can’t work out why this isn’t working in 4.18.1 version.

I’m a bit confused by what you’re trying to do.

If you want to add a new struct:

221077-capture.png

SetMembersInStruct node is only necessary is you want to edit an existing index in a struct array. Nowhere in the video did I see you try to edit the data while in the game.

Print the content of the array to see if data is being added correctly.

I think your issue lays elsewhere. How do you read the data from the array when you re-enter the menu. What happens to the widget when you exit? It gets hidden or destroyed?

Hi,
Sorry I have changed the Default button on the settings page for easy testing. Please find attached images of the BP’s parts I am using and a full video of what I am looking to have as the end results (once the struct is saving correctly) - - YouTube

I have tried the hide Widget and remove from partner option which both have the save results.
I want the struct to hold an array of VAR to be referenced later in the actual game such as:-
Players Name
Is Male
Allow Males
Allow Females
Lives
Points

I would then be able to use the Index of each player to pull all the information instead of using 6 different arrays creating a messy BP.

Difficult to say. Your best bet is to put print nodes whenever you deal with struct data and print length of the array. Take it one step at a time, methodically, and eventually you’re arrive at a spot that does not look right.

Make sure the containers are not hidden, it’s easy to mix up connections. When you add children, print it, too - you’ll see whether stuff is actually getting added. Print string is by far the most useful debug tool.