# Array Lengths and Literal Values

**URL:** <https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757 "2014-03-11T02:48:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757/1 "2014-03-11T02:48:36Z")

</div>

![array.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/e/64e32a96e805d188d907763580a2e8cdbaf4f597.jpeg)

Hi there, can someone tell me why is this considered a compile error.

I outputted an array, get it’s length and do an integer comparison

It makes no sense, the output is clearly an integer.  
If literal value is what it’s having problem with, comparing two array would also give the same problem.

Apparently I found out I am unable to make any useful mathematical operations with array lenght.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757/2 "2014-03-11T02:48:37Z")

</div>

The problem might be that the ‘filter array’ node is not being executed, is execution pin is not connected to anything.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757/3 "2014-03-11T02:48:37Z")

</div>

hmmm… shouldn’t the execution be coming from the ‘Branch’ in front? similar to operation involving comparing value. Plus Error message seems to be talking about something else.

Either way I’m going to try it.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757/4 "2014-03-11T02:48:38Z")

</div>

If a node has execution pins, it needs to be executed to work, so you will want to connect this before the branch node that uses the result.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757/5 "2014-03-11T02:48:39Z")

</div>

yup apparently it works. I was assuming the execution at the further down branch will cause the preceding nodes to be activated in order to return the value.

So the error message is erroneous then i’m assuming.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757/6 "2014-03-11T02:48:40Z")

</div>

Hi there!

sometimes you have to convert an integer to and from related types

you might try turning off the context sensitivity in the right click menu and see if there’s any other integer conversions that might help with your current issue

here’s a pic!

in case you didnt know, uploading pics is fine, just make sure to embed them in your posts, dont upload them to separate service.

you can use the picture button provided in this posting system 🙂

welcome to the epic udn forums!

 ![intconversions.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/e/d1e7bae54b37cdf5b3fc064db0457f8555c9e2ca.jpeg)

Rama

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:48am UTC](https://forums.unrealengine.com/t/array-lengths-and-literal-values/275757/7 "2014-03-11T02:48:40Z")

</div>

I don’t think conversion is an issue it explicitly says the output is an integer, and it makes sense, array length is indeed an integer.

Context sensitive is also on while I search for the “\>” function.  
This is a ridiculously simple function. But I don’t rule out I’m missing something.
