Problems setting value to array

I'm new here, so sorry but I'm getting a strage behaivor in my program... The program compiles and everything works great, until I add the problematic line. I want to store certain values, I'm using TVOUT library.

int arrayValue[200];
int counter = 0;

... //program code
arrayValue[counter] = xvariable; //this line is getting the error.
if(counter > 200){
counter = 0;
... //program code

Anyone with the same problem, I don't know why it stops working.

You have only posted partial code. I am going to assume you have declared xvariable somewhere, but I can't figure out what data type it is. You don't tell us what error that line causes.

Please post your entire code (this time in code tags rather than quote tags; use the " icon above the editor), as well as the error.

int arrayValue[200];

Depending on which Arduino you have, and what else is going on, an array of 200 ints, using 400 bytes, may deplete the available memory. Writing to an element in that array can then cause problems.