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

here’s the code:


and here’s what it says

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.

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

1 Like

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