Array index out of range...

Hi, I’m having trouble with one of my scripts and I cannot figure it out. How would I go about looking to fix this error?

IndexOutOfRangeException: Array index is out of range.
GameSettings.LoadCharacterData () (at Assets/C# Scripts/GameSettings.cs:82)
GameMaster.LoadCharacter () (at Assets/C# Scripts/GameMaster.cs:45)
GameMaster.Start () (at Assets/C# Scripts/GameMaster.cs:31)

Thanks,

Cas.

You’re trying to refer to an entry that doesn’t exist in the array.

var foo = new int[5];
foo[5] = 2; / <- ERROR!  Can only refer to 0 - 4

–Eric