Why do i get 'Illegal Operation Use' error in MQL

Hello I’m totally newbie in coding! When I compile my EA with metaeditor i get this error:


Could it depend because the Mt4 version is different now from the past when the EA was created?

Can someone help me to correct this? Please?

Thank so much to all the memebers!

The error is because of the incorrect syntax. It should read:

if(ErrMsg != NULL)
   ErrMsg = NULL;

Furthermore, it’s impossible to determine the context of ErrMsg since it’s a screenshot, but what is clear is that it needs to be refactored. If ErrMsg is a member variable then it should be given a “m_” prefeix (ie m_err_msg) and if it’s a non-const global variable, well… then it needs to be converted to a member…