MQH File - page 2

 
Thank you, Gordon, for your help.
I tried and cannot get the error description in my Comment.
For me it looks OK . But I get 0 in the output. Can somebody please point to my mistake? Thanks.
#import "stdlib.mqh"
string ErrorDescription(int error_code);
#import

int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
  OrderSend(Symbol(),OP_BUY,0.00000001,Ask,0,0,0,NULL,0,0,Green);
  // Comment("");
  int A = GetLastError();
  Comment("Error description ",ErrorDescription(A));
return(0);
}
 
You need to import from the ex4 file:
#import "stdlib.ex4"
   string ErrorDescription(int error_code);
#import
Or alternatively include the mqh file:
#include <stdlib.mqh>
 
Everything works!!! Thanks Gordon.
Reason: