Switch vehicle

Can someone tell me where the problem with my code pls

[150304-unity-2018414f1-personal-storeunity-blueded-game-p.png*_|150304]

using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.SceneManagement;
 
 public class SwitchVeh : MonoBehaviour
 {
     private GameObject[] vehList;
     private int index;
     private void Start()
     {
         index = PlayerPrefs.GetInt("VehSelected");
 
         vehList = new GameObject[transform.childCount];
         for(int i=0; i<transform.childCount; i++)
             vehList *= transform.GetChild(i).gameObject;*

foreach(GameObject go in vehList)
go.SetActive(false);

if (vehList[index])
vehList[index].SetActive(true);

}
public GameObject[] Tab;
public void SelectTab(int buttonIndex)
{
for (int i = 0; i < Tab.Length; ++i)
Tab*.SetActive(i == buttonIndex);*
}
public void ConfirmButton()
{
PlayerPrefs.SetInt(“VehSelected”, index);
SceneManager.LoadScene(“GameMenu”);
}
}
_*

It appear that

index = PlayerPrefs.GetInt("VehSelected");

give an index outside the array vehLists bounds.

Try this:

index = PlayerPrefs.GetInt("VehSelected");
Debug.Log("VehSelected: " + index + " of " + transform.childCount);

to check if your PlayerPrefs VehSelected is outside bounds of transforms child count.