error: not all control paths return a value - not sure what to do

 

Hi all,


I've attached the EA that I'm coding. It keeps coming up with "not all control paths return a value" - I''m not sure how to resolve the issue. Any help would be appreciated.


Thanks

Files:
 
int OnInit()
   {
   //---Get handles for indicators
   H1_EMA50_Handle=iMA(_Symbol,PERIOD_H1,50,0,1,PRICE_CLOSE);
   H1_EMA200_Handle=iMA(_Symbol,PERIOD_H1,200,0,1,PRICE_CLOSE);
   M15_50EMA_Handle=iMA(_Symbol,PERIOD_M15,50,0,1,PRICE_CLOSE);
   M15_200EMA_Handle=iMA(_Symbol,PERIOD_M15,200,0,1,PRICE_CLOSE);
   M5_50EMA_Handle=iMA(_Symbol,PERIOD_M5,50,0,1,PRICE_CLOSE);
   return(INIT_SUCCEEDED);
   }

int type needs to return something otherwise it was a void type.

 
Marco vd Heijden:

int type needs to return something otherwise it was a void type.

thanks for the help, sorted the error.