Please copy the full text of the error message and paste it here.
If the code is indexing a String the index went out of range. Indexes range in value from 0 to the length-1