# Accessed None Error When trying to find actor location from array

**URL:** <https://forums.unrealengine.com/t/accessed-none-error-when-trying-to-find-actor-location-from-array/388066>\
**Category:** Blueprint\
**Tags:** array-nodes, accessed-none, unreal-engine, UE4, Blueprint, question\
**Created:** [March 16, 2017, 4:31am UTC](https://forums.unrealengine.com/t/accessed-none-error-when-trying-to-find-actor-location-from-array/388066 "2017-03-16T04:31:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelindi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kelindi](https://forums.unrealengine.com/u/kelindi)\
**Post date:** [March 16, 2017, 4:31am UTC](https://forums.unrealengine.com/t/accessed-none-error-when-trying-to-find-actor-location-from-array/388066/1 "2017-03-16T04:31:02Z")

</div>

So ive been trying to create a respawn system in my multiplayer game where i have an actor class called respawn and place it around the level. I then find the location of all the respawn classes and randomly spawn at one of them, but when i seem to trigger the event I get an accessed none error. So far i have figured out that the array is not being filled when I am loading into the level from my main menu. Does anyone have any idea how I could fill the array when I load into the level.

 ![130254-acess+none+error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/5/ed5bdb114b4de4af3bb90ac14ea904f8027c317f.png)

 ![130255-eventthattriggersfunction.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/5/aa50a3f171f2037e2ad9c653112ebab6364c3b33.png)

 ![130256-respawnlocationfunction.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/9/d9929c105014b34a044f780bba6478561228f114.png)

---

<div class="post-metadata">

**Author:** ![Mosel3y](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mosel3y](https://forums.unrealengine.com/u/Mosel3y)\
**Post date:** [March 16, 2017, 10:46am UTC](https://forums.unrealengine.com/t/accessed-none-error-when-trying-to-find-actor-location-from-array/388066/2 "2017-03-16T10:46:18Z")

</div>

Is that the only place you are calling the FindRespawnLocation function? If not, where else are you calling it?

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [March 16, 2017, 1:34pm UTC](https://forums.unrealengine.com/t/accessed-none-error-when-trying-to-find-actor-location-from-array/388066/3 "2017-03-16T13:34:02Z")

</div>

Your array won’t fill up with there no “Reswpan” object on the level simple as that, so you need to somehow place them before this code is executed, or make your code check if array is empty and return some default vector in such case

---

<div class="post-metadata">

**Author:** ![kelindi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kelindi](https://forums.unrealengine.com/u/kelindi)\
**Post date:** [March 16, 2017, 5:59pm UTC](https://forums.unrealengine.com/t/accessed-none-error-when-trying-to-find-actor-location-from-array/388066/4 "2017-03-16T17:59:26Z")

</div>

Its the only place where I call the function

---

<div class="post-metadata">

**Author:** ![kelindi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kelindi](https://forums.unrealengine.com/u/kelindi)\
**Post date:** [March 16, 2017, 6:01pm UTC](https://forums.unrealengine.com/t/accessed-none-error-when-trying-to-find-actor-location-from-array/388066/5 "2017-03-16T18:01:08Z")

</div>

The respawn objects are placed in the level that i load into but it doesn’t fill the array for some reason.
