Baffled by ArrayResize!!

 
void OnStart()
{
   
 int n = 0;
 double fup[];
 
 for(int i=0;i<1000;i++)
 {
  double f = iFractals(NULL,0,MODE_UPPER,i)
  if(f > 0){fup[n] = f;Print(fup[n]); n++; ArrayResize(fup,n,1000)}
 }
}

This is the error message.

 I did exactly as the documentation states!

Please...somebody put me out of my misery!!

 
sd59:

This is the error message.

 I did exactly as the documentation states!

Please...somebody put me out of my misery!!

if(f > 0){ArrayResize(fup,n+1,1000); fup[n] = f; Print(fup[n]); n++;}
 
void OnStart()
{
 double fup[];
 if( ArrayResize(fup,1000) != 1000 )
  return;
 
 for(int i=0;i<1000;i++)
  fup[i] = iFractals(NULL,0,MODE_UPPER,i);
}
void OnStart()
{
   
 int n = 0;
 double fup[];
 
 for(int i=0;i<1000;i++)
 {
  double f = iFractals(NULL,0,MODE_UPPER,i)
  if(f <= 0)
   continue;
  if( ArrayResize(fup,n+1) != n+1 )
   continue;
  fup[n] = f;
  Print(fup[n]);
  n++;
 }
}
 

Thank you guys!

Reason: