check if my variable is in the same position as the array

Hey guys, I’m developing object inspection script

the idea is when I press (E) on the object, the dialog box appears, and take the first string and paste it into the text object in my scene, and if (E) is pressed again it puts the next string in the array, when the index is equal to the length of my array it comes out.

I have 2 problems, when he calls the first time he already adds 1 in the array starting in the second position.
it only exits after the array exceeded error occurs.

private void Update()
    {
       
        IndexPos();

        if (Input.GetKeyDown(KeyCode.E) && trigger)
        {
            if (playerBark.activeInHierarchy)
            {
                if (more)
                {
                    Use();
                  
                }
                else
                {
                    canUse = true;
                    playerBark.SetActive(false);
                    text.gameObject.SetActive(true);
                   
                    return;
                }

            }
            else
            {
                Debug.Log("First Use");
                Use();
            }


        }
    }
    void IndexPos()
    {
        if(i != barkText.Length)
        {
            indexExist = true;
        }
        else
        {
            indexExist = false;
        }
    }
public void Use()
{
    if (!canUse)
        return;

    if (indexExist)
    {
        Debug.Log("More Dialogues");
        more = true;
        i++;
        playerBark.SetActive(true);
        playerText.text = barkText*;*

}
else
{
Debug.Log(“Finish”);
more = false;
playerBark.SetActive(false);
}
}

Seems a silly suggestion but can you not just add -1 when your putting the string into the array e.g. doing

i - 1
instead of just
i.

It might not work but its worth a try!

UPDATE: I found the issue you incrementing i by 1 before you assign the position in the array.
Move the i++ 3 lines down so its after you assign the array index.

ours worked perfectly hahaha was stuck in it.