# Access none on a enum array (Possible bug?)

**URL:** <https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886>\
**Category:** Blueprint\
**Tags:** bug, ENUM, unreal-engine, bug-report, question, Blueprint\
**Created:** [June 17, 2017, 4:14pm UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886 "2017-06-17T16:14:17Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 17, 2017, 4:14pm UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/1 "2017-06-17T16:14:17Z")

</div>

I have been trying to figure this out for a while now i keep getting a access none on a enum array and i should not be getting one i have been doing all the proper checks to make sure everything is valid. Here is a picture of the array area.  
now this does not stop the code from working at all the code still works fine but the error still shows…  
im hopping there might be a way to fix this. now the enum array has 1 element in it i have check this many times over. but i still get the access none. im not sure if this is a bug or what.

error message :

Error Blueprint Runtime Error: Accessed None trying to read property CallFunc\_Array\_Get\_Item53 from function: ‘ExecuteUbergraph\_ThirtydayFirstPersonCharacter’ from node: ForEachLoopWithBreak in graph: reload slot 2 in object: ThirtydayFirstPersonCharacter with description: Accessed None trying to read property CallFunc\_Array\_Get\_Item53  
Error Blueprint Runtime Error: Accessed None from function: ‘ExecuteUbergraph\_ThirtydayFirstPersonCharacter’ from node: ForEachLoopWithBreak in graph: reload slot 2 in object: ThirtydayFirstPersonCharacter with description: Accessed None

if anyone has any info on this please do tell.

thanks

 ![200744-accessnone.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/b/ddb7f3be7bfabc9a7706408ac97a3c58761cb03f.png)

---

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 20, 2017, 11:16am UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/2 "2017-06-20T11:16:10Z")

</div>

bumping cause i need to get this fixed.

---

<div class="post-metadata">

**Author:** ![Omnorimli](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Omnorimli](https://forums.unrealengine.com/u/Omnorimli)\
**Post date:** [June 21, 2017, 3:36pm UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/3 "2017-06-21T15:36:34Z")

</div>

Would really like an answer to this as well

---

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 22, 2017, 11:57am UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/4 "2017-06-22T11:57:06Z")

</div>

bumping for some kind of help on this…

---

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 23, 2017, 12:56am UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/5 "2017-06-23T00:56:11Z")

</div>

i would think that the case if i was checking the length. which im not. last index will read 0 1 2 3 depending on the indexes in the array. length on the other hand goes by 12 3 an never starts at 0. ill test it anyways to see if thats the case when im in the office tomorrow but from what i under stand unless its been changed last index will start at 0 if there is a index in the array other wise it starts at -1 if no index’s are in the array.

---

<div class="post-metadata">

**Author:** ![Ninjin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ninjin](https://forums.unrealengine.com/u/Ninjin)\
**Post date:** [June 23, 2017, 1:12am UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/6 "2017-06-23T01:12:42Z")

</div>

Yeah, you are right. Can you maybe show where your array element nodes from your first ForEachLoopWithBreak are going and why you are not checking them? It’s difficult to see the big picture.

---

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 23, 2017, 11:19am UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/7 "2017-06-23T11:19:06Z")

</div>

yeah ill take a neater screen shot in a bit but its the first last index in the image there. but those run fine. its the enum array thats causing the access none but ill neaten it up so its more readable as well. i code fast so i end up not making it all to neat since im the only one reading it .

---

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 23, 2017, 12:49pm UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/8 "2017-06-23T12:49:19Z")

</div>

updated the graph to point out the trouble section every thing else flows fine. The error it self does not even stop the code which is done on button press.  
and the enum array has 1 element in it. and the enum array for each loop with break is what is causing the access none error.

 ![201153-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/9/1e9eae80eefe05fcb5672affd2b07ab6045b4919.png)

there is one more for each loop with break in this graph

but it does not need checks since the checks for it where already run once and it does not toss any errors. picture of it anyways. this never errors out since i do all my checks at the start of the node chain.

 ![201154-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/e/cae45bb97170687d549095e1fcab26c1b44c72f1.png)

---

<div class="post-metadata">

**Author:** ![Ninjin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ninjin](https://forums.unrealengine.com/u/Ninjin)\
**Post date:** [June 23, 2017, 2:05pm UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/9 "2017-06-23T14:05:14Z")

</div>

I tested the check with last index and calling the array element, it works just fine. I can’t get my head around it, it must be the WeaponBase struct that has no Weapon Type assigned. If it’s not, I tried \<3

---

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 23, 2017, 2:14pm UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/10 "2017-06-23T14:14:35Z")

</div>

thanks for trying! ill keep testing it see if i can find the error.

---

<div class="post-metadata">

**Author:** ![invayne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invayne](https://forums.unrealengine.com/u/invayne)\
**Post date:** [June 23, 2017, 2:34pm UTC](https://forums.unrealengine.com/t/access-none-on-a-enum-array-possible-bug/398886/11 "2017-06-23T14:34:54Z")

</div>

took out the for each with break on the enum and it runs fine with no error.
