New compiler at MQL4?

 

Hi

After some months away of MQL4 programming, today I have compiled a code which was working perfectly before (9 months), but now I got a compiling error.

This is the code line:

switch(Orders[index,1])

Orders is defined like this:

double
Orders[100,12];


The error is this one:

'Orders' - ilegal switch expression type


As mentioned before, this error is new, it worked ok previously, was it an update in MQL4? any help on the error?

Thanks

 
desert:

Hi

After some months away of MQL4 programming, today I have compiled a code which was working perfectly before (9 months), but now I got a compiling error.

This is the code line:

switch(Orders[index,1])

Orders is defined like this:

double
Orders[100,12];


The error is this one:

'Orders' - ilegal switch expression type


As mentioned before, this error is new, it worked ok previously, was it an update in MQL4? any help on the error?

Thanks


Switch operator works with integer only.
 
You can only use integers with switch now
 

Ok, I see, thanks for your answers.

I have tested this with an old metaeditor, it compiles without errors.

Could I use that expert advisor in the new Mt4 version? Any posible issue with that?


Thanks again guys.

 
desert:

Ok, I see, thanks for your answers.

I have tested this with an old metaeditor, it compiles without errors.

Could I use that expert advisor in the new Mt4 version? Any posible issue with that?


Thanks again guys.

It should work.
Reason: