serial print and 2d array arduino crash - plesae help.

okay, so i got a 20 by 20 array im trying to write to the serial moniter (putty.exe)

int var = 0;


int table [20] [20] = {
  {1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {1,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  };

void setup() {

  Serial.begin(9600);
}

void loop() {

   Serial.println("test one");
     //var = table[1][1];
   Serial.print(var);
  
  
}

as long as i leave var = table[1][1]: out of the program it works, "test one" is sent to the computer.

but if put it in, or if i try Serial.println(table[1][1]); the program crashes, i get not "test one" sent to the computer. how do i fix this.

You got an extra comma there at the end of your array declaration. I don't know if that's your problem, but it stuck out.

dumbass me. figured it out.

you got me to thinking it was not a problemm with my code.

im using a 168 nano from china. array was too big. not enough ram.

but thanks for getting me thinking!

it works, DOH!