Not all control paths return a value 'error'

 

code

how solve problem?

 
add "return(rates_total);" before the last bracket
 
I dont understand which it(add "return(rates_total);")?????.........
 

code2

????????????????????????????

 
jasoncomic:

????????????????????????????

oh god.


return(rates_total);
}
//end//
 

code3

cannt work...sad

 
jasoncomic:

cannt work...sad

of course it don't work....you need to declare it! You can't just use rates_total out of the thin air ;)

 

when you post code use Alt + S

attach code

 
jasoncomic:

cannt work...sad

Hey - don't panic! It's warning not an error telling you that in your function is left only within some IFs, WHILEs, FORs, .. but if none of them has been triggered the execution pointer comes to the end - the final } - and there it finds nothing what to do or return. Just add here something appropriate.

We can't decide as we don't know the whole function! Kenneth assumed it is the main function of the indicator which should return rates_total!!

Try to learn before you shout?

:)

 
Carl Schreiber:

Hey - don't panic! It's warning not an error telling you that in your function is left only within some IFs, WHILEs, FORs, .. but if none of them has been triggered the execution pointer comes to the end - the final } - and there it finds nothing what to do or return. Just add here something appropriate.

We can't decide as we don't know the whole function! Kenneth assumed it is the main function of the indicator which should return rates_total!!

Try to learn before you shout?

:)

as the image show it is clearly an error not a warning ;) and i did assume the rates_total was some function in the code based on this earlier post

 
jasoncomic:

how solve problem?

It is a repainter/misleading zigzag toy regardless of the warning,dont see only attractive arrows that will not stay there when price move ahead

Reason: