# Creating an instance of my device causes the device arrays to be empty

**URL:** <https://forums.unrealengine.com/t/creating-an-instance-of-my-device-causes-the-device-arrays-to-be-empty/795852>\
**Category:** Programming & Scripting\
**Tags:** unreal-editor-for-fortnite, fortnite\
**Created:** [March 21, 2023, 5:36pm UTC](https://forums.unrealengine.com/t/creating-an-instance-of-my-device-causes-the-device-arrays-to-be-empty/795852 "2023-03-21T17:36:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [March 21, 2023, 5:36pm UTC](https://forums.unrealengine.com/t/creating-an-instance-of-my-device-causes-the-device-arrays-to-be-empty/795852/1 "2023-03-21T17:36:40Z")

</div>

I have 2 devices, my `main_device` and a `vote_device,` 2 seperate `.verse` files. In main I create a vote\_device like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/2/f5247b1ee2727c32564a3367663c0e271cd13a7e.png)

`vote_device` has multiple device filled arrays (linked them with UEFN)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/b/bbb9d4bbdcb35c763b5a853ff057223c9e375959.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/1/50114a8131952b91716ff84eae31f6e147ff1cf7.png)

But when I use `VoteDevice.ScoreManagers.Length` it gives 0. It only gives 3 when I write this line anywhere in the `vote_device.verse`. The problem is, when I try to use a function in main like `VoteDevice.FindVoteWinner` it does logic on empty arrays.

---

<div class="post-metadata">

**Author:** ![DustinREDGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dustinredgames/32/634988_2.png) [@DustinREDGames](https://forums.unrealengine.com/u/DustinREDGames)\
**Post date:** [March 21, 2023, 6:49pm UTC](https://forums.unrealengine.com/t/creating-an-instance-of-my-device-causes-the-device-arrays-to-be-empty/795852/2 "2023-03-21T18:49:02Z")

</div>

I’ve also been seeing the same issue, but thought it was fixed in 24.0, but seems to have broken again in 24.01:  
[https://forums.unrealengine.com/t/blocker-custom-devices-local-variables-are-reset-when-called-from-another-device/766865/10](https://forums.unrealengine.com/t/blocker-custom-devices-local-variables-are-reset-when-called-from-another-device/766865/10)

---

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [March 21, 2023, 6:49pm UTC](https://forums.unrealengine.com/t/creating-an-instance-of-my-device-causes-the-device-arrays-to-be-empty/795852/3 "2023-03-21T18:49:17Z")

</div>

The answer is using a tag on the vote\_device in UE

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/8/738ff9df48b447a0742a89ea6c0dc9559310da23.png)

---

<div class="post-metadata">

**Author:** ![Tom.Noonan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tom.Noonan](https://forums.unrealengine.com/u/Tom.Noonan)\
**Post date:** [March 22, 2023, 7:01pm UTC](https://forums.unrealengine.com/t/creating-an-instance-of-my-device-causes-the-device-arrays-to-be-empty/795852/4 "2023-03-22T19:01:11Z")

</div>

I can’t reproduce this running 24.01 now. I can print the array.Length from either device and it will print correct number. Is the reference from the main\_device in the level definitely established to the correct vote\_device in the level? If so is there any more information you could provide to try help us track this down?

---

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [March 23, 2023, 4:47pm UTC](https://forums.unrealengine.com/t/creating-an-instance-of-my-device-causes-the-device-arrays-to-be-empty/795852/6 "2023-03-23T16:47:07Z")

</div>

I figured that I did not connect an actual instance of the vote\_device to my @editable VoteDevice field in the main.
