C# array index is out of range, but is never set to be out of range [Fixed]

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class ChunkCore : MonoBehaviour {

	public string[,] ChunkBlocks = new string[961,32];


	// Use this for initialization
	void Start () {

	
	}

	public void SaveChunk(){

		string SaveBlocks = "";
	
		int SortTrys = 0;
		
		while (SortTrys < 31) {
			
			int setChunkDat = 0;

			
			while (setChunkDat < 961) {
				
				SaveBlocks += ChunkBlocks[SortTrys,setChunkDat] + ",";
				setChunkDat += 1;
			}
			SaveBlocks += "-";
			SortTrys += 1;
			//end setting chunk
		}

		try {   System.IO.File.WriteAllText( Core.StaticWorldSaveLocation + @"\Dem\Soul\Land\" + transform.name + ".dat", SaveBlocks);}

		catch{Debug.Log("Error: Failed to save chunk " + transform.name);
		}
	
	}

	// Update is called once per frame
	void Update () {
	
	}
}

When I run my game, and do the SaveChunk(), I get this message

IndexOutOfRangeException: Array index is out of range.
ChunkCore.SaveChunk () (at Assets/Standard Assets/Scrips/WorldBuilder/ChunkCore.cs:30)
CubeCore.Start () (at Assets/Standard Assets/Scrips/Cube/CubeCore.cs:40)

I changed
public string[,] ChunkBlocks = new string[961,32];
to
public string[,] ChunkBlocks = new string[9610,320];
and
public string[,] ChunkBlocks = new string[961,31];

but still this message.

so, every now and then I miss a small thing, and then I spend hours trying to fix my “problem…”

This time I got SortTrys,setChunkDat backwards in my chunkBlocks. It should be

SaveBlocks += ChunkBlocks[setChunkDat,SortTrys] + “,”;
not
SaveBlocks += ChunkBlocks[SortTrys,setChunkDat] + “,”;

so, every now and then I miss a small thing, and then I spend hours trying to fix my “problem…”

This time I got SortTrys,setChunkDat backwards in my chunkBlocks. It should be

SaveBlocks += ChunkBlocks[setChunkDat,SortTrys] + “,”;
not
SaveBlocks += ChunkBlocks[SortTrys,setChunkDat] + “,”;