How to return OrderOpenPrice?

 
Hi... I newbie mql4...
I want return value of first trade OrderOpenPrice to open pending order. My code get error of " ")"-not all control paths return a value". Please tell me what mistake I maked?

Here my code:


Files:
forum.txt  1 kb
 

Hi!

You only return a value if your function finds an order. You also have to return a value if there is no order found.

 
eddie:

Hi!

You only return a value if your function finds an order. You also have to return a value if there is no order found.


Thank eddie... Problem solved...
Reason: