Not all control path return a value New comment Legendy Laszlo 2024.07.29 11:21 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); } Would you help a poor wannabe coder? Help with 5 digit pricing Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. Sergey Golubev 2024.07.29 13:06 #1 please edit your post - When you post code please use the CODE button (Alt-S)! William Roeder 2024.07.29 14:55 #2 Legendy Laszlo: How can I fix this? Return an appropriate value before the closing bracket. New comment
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);
}