Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Am I doing something wrong, or is this Map:Dictionary not saving my data?

I am attempting to store a list of squads, each with 9 members, with varying stats on each squad member. I found the Map:Dictionary feature for variables and figured it would be a great way to create a tree of variables.

When the attached screenshot is run, the first print string outputs 211, while the second print string outputs 0. This tells me that the 211 is not being added properly. If a default variable is set for 'AllSquads' variable, then both print strings output that default variable. This is obviously not the behavior that I have intended either and both seem to be a bug.

Either way, can someone point me in a direction that might solve this problem?

alt text

Product Version: UE 4.15
all squads data.jpg (136.7 kB)
more ▼

asked Apr 11 '17 at 05:42 AM in Blueprint Scripting

avatar image

11 1 2

avatar image khat1 May 01 '17 at 07:00 PM

There isn't a lot of info that I've been able to find but from what I cant tell I think its a known bug that they are addressing in 4.16. Can we get someone to confirm this? I as well can not get maps to add any values to them.

avatar image Imagine-Games Apr 09 '19 at 05:23 AM

*edit, got it fixed...(details lower below) has this been fixed? i seem to have this same issue but with save files

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I figured out the issue with map. It wasn't a bug at lest in my case. I didn't notice that in blueprint you can set variables being passed to a function to be passed through as copy or as a reference to the actual variable just like is c++. Once i enabled pass as reference everything worked again. If i remember correctly this occurs when passing variables into functions and you can find the pass as reference option by single clicking on the function you are passing the variable through and looking at the details pane. If you have issues send me a private message with a link to your repository and ill take a look.

more ▼

answered Apr 13 '19 at 01:35 AM

avatar image

11 1 1

avatar image Imagine-Games Apr 13 '19 at 03:39 AM

you are correct, I actually did the same thing yesterday AND used the ADD function, which is specific for MAPS(unlike arrays where you can just set a value), and got my issue resolved.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question