Are error codes outdated in stdlib.mqh?

 

My code:

#include <stdlib.mqh>

(...)

Print("Last error on " + _Symbol + ": " + IntegerToString(GetLastError()) + ": " + ErrorDescription(GetLastError()));

The log panel prints:

Last error on EURAUD: 4108: no error

I check up on the error code list:

https://docs.mql4.com/constants/errorswarnings/errorcodes

4108    ERR_INVALID_TICKET    Invalid ticket

Is anyone here properly informed of such discrepancies? Maybe I'll have to write up my own function?

TIA

 
Print("Last error on " + _Symbol + ": " + IntegerToString(GetLastError()) + ": " + ErrorDescription(GetLastError()));

You called GetLastError which cleared the error. Then you called it again and got no error.

Don't copy and paste code. Read it once into a variable and use the variable.

Reason: