Not all control path return a value

 

Hello Guys!

I would need some help here.

I have this part of the code from an Alert indicator and have that massage.

How can I fix this?

Thanks in advance!

Laci

int OnInit()

{   //--- make and setup resistanse line

  

      if(LineStyle !=0)LineWidth=0;

      

      if(ObjectFind("UpperLine")==-1)

      ObjectCreate("UpperLine",OBJ_HLINE,0,0,Bid);

      ObjectSet("UpperLine",OBJPROP_COLOR,UpperClr);

      ObjectSet("UpperLine",OBJPROP_WIDTH,LineWidth);

      ObjectSet("UpperLine",OBJPROP_STYLE,LineStyle);

      

      //--- make and setup suppor line

      

      if(ObjectFind("LowerLine")==-1)

      ObjectCreate("LowerLine",OBJ_HLINE,0,0,Bid-(100*Point));

      ObjectSet("LowerLine",OBJPROP_COLOR,LowerClr);

      ObjectSet("LowerLine",OBJPROP_WIDTH,LineWidth);

      ObjectSet("LowerLine",OBJPROP_STYLE,LineStyle); 

      

     

}  

 

please edit your post -

When you post code please use the CODE button (Alt-S)!

Use the CODE button

 
Legendy Laszlo: How can I fix this?

Return an appropriate value before the closing bracket.