how can i downgrade MT5 for older version for testing only - page 2

Keith Watford
Moderator
33799
Quen24:

Do not double post.

Your duplicate post has been deleted.

spottypegasus
22
spottypegasus  

I have just updated my MT5 to build 2980, but there is a compiling error shown below:

Anybody else has the same problem... And how to solve this??

It was compiled successfully using build 2940, but I don't have a copy of it so I can't revert back to it...

Any help is greatly appreciated...


Regards,

Herman

Vladimir Karputov
Moderator
291613
spottypegasus :


Do not use

{ 0 }

to initialize the structure.

Need to use

{}
spottypegasus
22
spottypegasus  
Vladimir Karputov:

Do not use

to initialize the structure.

Need to use

Ok, I replaced all {0} with {} and it compiled OK...

Thank you so much!

Rgds,


Herman

Vladimir Karputov
Moderator
291613
spottypegasus :


The language is becoming more strict and correct all the time:

Forum on trading, automated trading systems and testing trading strategies

Features of the mql5 language, subtleties and methods of work

Ilyas , 05/20/20/28 18:18

We are expanding the initialization sequences "{...}", in the next build it will be allowed to use any expression, not just a constant one.

Instead of this change, there will be a restriction on the use of constants for enumerations (as for a regular expression): if the constant is not included in the enumeration, an appropriate error will be generated.

Analysis of the existing codes showed that the sequence of one zero is often used incorrectly - "{0}"

For example like this:

 MqlTradeRequest request={ 0 };


Such an entry means setting the value to zero for the first structure field and zeroing the rest of the fields.

For the above line of code, according to the new rules, an error will be generated, since the first field is of type ENUM_TRADE_REQUEST_ACTIONS , an enumeration missing the value "0"

cannot convert 0 to enum 'ENUM_TRADE_REQUEST_ACTIONS'


Correctly it will be like this:

 MqlTradeRequest request={};

Douglas Silva
158
Douglas Silva  
Alain Verleyen #:

Here is 1502.

The year is 2022 and you still helping us with this files.


Thank you