How to print the number of the line?

 

Hello,

 

I would like to print the number of the line in my code. For example

if (condition1 && condition2){

Print("Error in line ",GetLineNumber());

}

 

where the function GetLineNumber() is a function the gives the number of the line where it is called.

 

Is there such a function out there?  Any idea on how to construct this function?

 

 Best regards,

Daniel 

 
There is no such function; there is a macro: Predefined Macro Substitutions - MQL4 Documentation
 
WHRoeder:
There is no such function; there is a macro: Predefined Macro Substitutions - MQL4 Documentation
Thanks.
 
Hi, did you manage to solve the problem?
 
Oscar Andres Murillo Lopez #:
Hi, did you manage to solve the problem?

Have you even read the topic?

William has already supplied the answer!