Hi,
Quote:

Well, two things...
1) Are you sure you initialized the array with NULL?
, no thanks for pointing that out. It still crashes though (but maybe it is conflicting with other code, I have to better check that). Here is the code where I make the array set to NULL on startup:

Code:
//make array start with null values
 j = 1;
 for(i=1; j<5; i++) 
 {
  pointer_pan[j][i] = NULL;
  if (i >= 30) { j += 1; i = 1; }
 }



Quote:
2) Why do you skip over the first element in the arrays?
, for me it sounds more logical beginning with 1 than 0 tongue .

Quote:
Bonus question: Why not use two-dimensional arrays?
, because I had never heard about those blush. I am now implementing them in my code, tyty.

I am also trying putting in a text array, but I can't seem to get pstring with it working right. Anyone an idea why the beneath str_cpy results in a crash?

Code:
TEXT* pointer_text[5];

....

var i;
 //create array text mdl found
 for(i = 1; i < 5; i++)
 {
  pointer_text[i] = txt_create(1,21);
  pointer_text[i].pos_x = 10;
  pointer_text[i].pos_y = 135;
  pointer_text[i].layer = 21; 
  pointer_text[i].font = "Calibri#20";
  vec_set(pointer_text[i].blue,vector(155, 255, 155));
 }

....
//reset text string
str_cpy((pointer_text[1].pstring)[1],"");


Last edited by Reconnoiter; 07/25/14 18:43.