# How to: Different functions modifies one data structure

**URL:** <https://forums.unrealengine.com/t/how-to-different-functions-modifies-one-data-structure/349639>\
**Category:** Blueprint\
**Tags:** data-structures, unreal-engine, functions, Blueprint, question\
**Created:** [March 5, 2016, 7:18pm UTC](https://forums.unrealengine.com/t/how-to-different-functions-modifies-one-data-structure/349639 "2016-03-05T19:18:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raidfire.Net](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raidfire.Net](https://forums.unrealengine.com/u/Raidfire.Net)\
**Post date:** [March 5, 2016, 7:18pm UTC](https://forums.unrealengine.com/t/how-to-different-functions-modifies-one-data-structure/349639/1 "2016-03-05T19:18:53Z")

</div>

Hi,

i have made different functions and they modifies one data structure.  
Unfortunatey the data structure does not remain solid.

How do you work in that case?  
What is your solution for keeping data structures solid when several functions edit it.

Thanks in advance.

[raidfire.net](http://raidfire.net)

---

<div class="post-metadata">

**Author:** ![Sentura](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sentura](https://forums.unrealengine.com/u/Sentura)\
**Post date:** [March 5, 2016, 10:59pm UTC](https://forums.unrealengine.com/t/how-to-different-functions-modifies-one-data-structure/349639/2 "2016-03-05T22:59:18Z")

</div>

I think you need to provide more information if you want a proper answer. What type of data structure? When is it instanciated? Where is it used? Do you have a screenshot?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f54268a3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f54268a3](https://forums.unrealengine.com/u/anonymous_user_f54268a3)\
**Post date:** [March 5, 2016, 11:28pm UTC](https://forums.unrealengine.com/t/how-to-different-functions-modifies-one-data-structure/349639/3 "2016-03-05T23:28:21Z")

</div>

You may want to add a bool to it that locks it, and set it to locked when one thing starts to modify it, then unlock when it is finished. Only allow modification if it’s not locked. You could use a timer to keep trying to modify until it’s not locked.
