# Why can't I traverse the tuple within the function using the integer variable I created prior to defining the function?

**URL:** <https://forums.unrealengine.com/t/why-cant-i-traverse-the-tuple-within-the-function-using-the-integer-variable-i-created-prior-to-defining-the-function/1763539>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [March 20, 2024, 4:06pm UTC](https://forums.unrealengine.com/t/why-cant-i-traverse-the-tuple-within-the-function-using-the-integer-variable-i-created-prior-to-defining-the-function/1763539 "2024-03-20T16:06:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deal\_with\_Exceed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@deal\_with\_Exceed](https://forums.unrealengine.com/u/deal_with_Exceed)\
**Post date:** [March 20, 2024, 4:06pm UTC](https://forums.unrealengine.com/t/why-cant-i-traverse-the-tuple-within-the-function-using-the-integer-variable-i-created-prior-to-defining-the-function/1763539/1 "2024-03-20T16:06:30Z")

</div>

here’s the code:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/5/b85f9e5cd82d369b3cb92470aac943dd4efc7a88.png)  
and here’s what it says  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/3/1e3c65ebd1d2e11b6ba9333fe149073be94ec6f6.png)  
I honestly think this is pretty dumb why I can’t provide a variable, since its basically asking for an integer and I’m giving one to it. Is there any workaround for this? I’m trying to update the playerCarTier by += 1 every time the WinRestart() function is called.

---

<div class="post-metadata">

**Author:** ![t.tutiya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/t.tutiya/32/924637_2.png) [@t.tutiya](https://forums.unrealengine.com/u/t.tutiya)\
**Post date:** [March 21, 2024, 2:37am UTC](https://forums.unrealengine.com/t/why-cant-i-traverse-the-tuple-within-the-function-using-the-integer-variable-i-created-prior-to-defining-the-function/1763539/2 "2024-03-21T02:37:14Z")

</div>

> **[Tuple](https://dev.epicgames.com/documentation/en-us/uefn/tuple-in-verse#specifyingavariablewithatupletype)**
>
> A tuple is a container where you can group two or more expressions of mixed types and access the elements in the tuple by their position.

Tuples can only specify literals for indexes to ensure that no failures occur.  
You can use array type instead.

---

<div class="post-metadata">

**Author:** ![Daigoro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daigoro](https://forums.unrealengine.com/u/Daigoro)\
**Post date:** [March 28, 2024, 6:37pm UTC](https://forums.unrealengine.com/t/why-cant-i-traverse-the-tuple-within-the-function-using-the-integer-variable-i-created-prior-to-defining-the-function/1763539/3 "2024-03-28T18:37:04Z")

</div>

You can cast your tierlist into an array, provided all entires share a common type and iterate over it instead.
