Error compiling with ErrorDescription

 

Hello, I'm having a problem when compiling an expert advisor.

In one of the functions it uses the function GetLastError() to (well) get the last error and Print out a report. The problem I'm having during compile is that it says ErrorDescription() function is not defined. I grabbed the code for GetLastError() right from the help file, and I've seen it used in other EAs, Does anyone know what I might be missing to get it to work?

thanks

Sean

 
Sean0:
Hello, I'm having a problem when compiling an expert advisor.

In one of the functions it uses the function GetLastError() to (well) get the last error and Print out a report. The problem I'm having during compile is that it says ErrorDescription() function is not defined. I grabbed the code for GetLastError() right from the help file, and I've seen it used in other EAs, Does anyone know what I might be missing to get it to work?

thanks

Sean

You must have this at the beginning of your code :

#include #include
 

thanks.

That fixed it perfectly.