Can I use the Map variable and pass my high score to those with equal level names?

Hello everyone, I can get the highscore of a single level in the map variable type according to the name equality, but I keep it in a single highscore integer variable, how can I use it with the map variable? It will also update the value value of the level name in my level data structure and the value value of the one that is equal to the key in my levelhighscore map variable, sorry I may not have explained a little, but briefly I want to take each level from a highscore map variable and transfer it to my other map variable and pull it, I know this will be with a loop but I can’t do it, thank you very much to those who answer in advance.






resim

I apologize if it’s too complicated, I’m just learning.

So you essentially want to copy the map? Or just pull the high score?

I mean that key and load will change the value value of the level that is equal to the level name, that is, the value of highscore, I do not want to create more than one highscore variable for this, it will affect my performance badly.

What I mean is, if the key in my levelhighscroes map variable and the loadlevelname in leveldata are equal and the value of this equal key is greater than and equal to the score, it will transfer the high score to the value of this key and my save function will save these equal ones.

I’m so bad at loops

I’m still a little confused on what your trying to do, sounds like your trying to update high scores essentially? If you pull of your saved game map variable, and call “contains” or “find” and plug in yhe return value from the “get current level name” node and plug that in you can determine if it is present and find the value associated with it, to update the value just call “add” and it will replace it if it’s present. Never a bad idea to call “remove” first though with save game data

(post deleted by author)

(post deleted by author)

really forgive me for wasting your time, I found a very silly bug in my project and that’s why I couldn’t do what I wanted, I solved the problem and I will edit it and post it again

Okay, this might be a bit long, but here goes:
Bugs I Found: My Sub-Level maps were not named, the map functions I made in my Pawn Actor blueprint are not working in a way I don’t understand (I tried to do it with Event Dispatcher but it still doesn’t work)
Solutions: To get the name of the map, I created an empty actor class and placed it in my map so that I could get the name of the map.
The calculation was actually supposed to be the way I did it from the first day, but since I didn’t notice these errors, I spent 3 days on it, I created an empty actor class and cast the pawn actor and save game class into it, and here I did the calculation and got the event name from this actor, I ran it in my pawn actor blueprint and it worked
Images are in the links below:

Pawn Event Tick
High score calculation for each level