Problem with a code

 

Hi together,

I copied a code and modified it at several rows. When compiling it MT4 Editor shows an error. ErrorDescription is not defined:

           m_Allow_Trading = false;
           ErrorCode = GetLastError();
           string ErrorDescIniLongMod = ErrorDescription(ErrorCode);
           string ErrorAlertIniLongMod = StringConcatenate("OP_BUY-Initial-Modifiy does not work ", ErrorCode, " ", ErrorDescIniLongMod);
           Print(ErrorAlertIniLongMod); 
           Print("Handel gestoppt! - OP_BUY-Modifikation");
           return(0);
 
nirvanamac:

Hi together,

the other code doesn't show an error when compiling:

        m_Allow_Trading = false;
           ErrorCode = GetLastError();
           string ErrorDescIniLongMod = ErrorDescription(ErrorCode);
           string ErrorAlertIniLongMod = StringConcatenate("OP_BUY-Initial-Modifiy does not work ", ErrorCode, " ", ErrorDescIniLongMod);
           Print(ErrorAlertIniLongMod); 
           Print("Handel gestoppt! - OP_BUY-Modifikation");
           return(0);
 
I searched through some onlinemedia and/or handovers, manuals etc. but I can not find any error. Anybody there who can give me a hint?
 

See documentation :

The GetLastError() function return codes. Error code constants defined at stderror.mqh file. To print text messages use ErrorDescription() function defined at stdlib.mqh file.

You need to add this line above your code :

#include <stdlib.mqh>
 
angevoyageur:

See documentation :

You need to add this line above your code :


You are so right...omg sry for being so blind^^ thank you very very much