Errors, bugs, questions - page 1327

 

In ## you cannot use the 1st digit

#define  MACRO( x, y )   x##y
void OnStart()
{
        int i = MACRO( 1, 5 );
        Print( i );
}
 

You cannot omit the macro parameter in a certain combination

#define  MACRO1( x )             void x() { Print( __FUNCTION__ ); }
#define  MACRO2( prefix, function )      MACRO1( prefix##function )
#define  MACRO3(         function )      MACRO2(         h2, function )
#define  MACRO4(         function )      MACRO2( /*опущен*/, function )
//---
   void f1() { Print( __FUNCTION__ ); }
MACRO3( f2 )          //нормально
 MACRO4( f2 )          //Ошибка: argument expected for the function-like macro
//---
void OnStart()
{
        MACRO( /*опущен*/, f1 ); //нормально
        h2f2();
        f2();                   
}
 
Karputov Vladimir:
No. The file was not modified from the standard delivery and MQL5 Storage was not used. The user probably went into a different "Data Folder" - at least that's the most viable version so far.
Searched around the computer. The file is dead after all (( The OS used is Windows Server 2012. The file was fixed in folder "C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\Scripts" (last date - March 2015). I don't know how it happened that it was overwritten with a file with the same name, but from "C:\Program Files\MetaTrader 5\MQL5\Scripts" folder (last modified date - August 2014). The source file with mq5 extension has been rewritten, while the compiled file has remained in the latest version. I haven't usedMQL5 Storage, now I will.
 
kogriv:
Searched the computer. The file is dead after all (( The OS used is Windows Server 2012. The file was in the folder "C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\Scripts" (last date - March 2015). I don't know how it happened that it was overwritten with a file with the same name, but from "C:\Program Files\MetaTrader 5\MQL5\Scripts" folder (last modified date - August 2014). The source file with mq5 extension has been rewritten, the compiled file has remained in the latest version. I haven't usedMQL5 Storage, now I will.
There should not be your (user) files in folder C:\Program Files\MetaTrader 5\MQL5\Scripts! If a file has appeared there, it is only because of manual intervention in MetaEditor's work. All work with editing and creation of files must take place in data folder C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\....
 
Karputov Vladimir:
In the folder C:\Program Files\MetaTrader 5\MQL5\Scripts your (user) files should not exist! If a file appears there, it is only because of manual intervention in MetaEditor's work. All work with editing and creating files should be placed in data folder C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\....
I copied it in first place (C:\Program Files\MetaTrader 5\MQL5\Scripts), because I didn't know about special features of file location on server, and then I copied it to the right folder. I don't think it's "interference with work...".
 
kogriv:
Why not? I copied it there at first (C:\Program Files\MetaTrader 5\MQL5\Scripts), because I didn't know about peculiarities of file location on the server, then I figured it out and copied it to the right folder. I don't think it's "tampering...".
Exactly - manual intervention. You have to move all your files from C:\Program Files\MetaTrader 5\MQL5\... (cut and paste) to its rightful place: C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\....
 
Karputov Vladimir:
Exactly - manual intervention. All your files from C:\Program Files\MetaTrader 5\MQL5\... should be moved (cut and paste) to their rightful place: C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\....
What if you didn't cut it out?
 
kogriv:
What if you didn't cut it out? But put it in...
In that case, your overwrite situation is about to happen again. The user has one data folder - C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\.... If you want to write files into other folders, you do so at your own risk. After all, it is your money.
 
Karputov Vladimir:
In that case, your overwrite situation is about to happen again. The user has one data folder - C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\9A8888D580475F4165FB840CCD79A65C\MQL5\.... If you want to write files into other folders, you do so at your own risk. After all, it is your money.

what about the /portable key?

and by the way, what are these folders "sdfgshndyueenerneb673756nr76,.t89.y80.tr76m5nbwb6qw6b3qvqvb6547nw8nme789m"? If there are several terminals installed, it's not an easy task to determine which folder belongs to which terminal. Of course, you can enter them using MT tools, but in all other cases it is a pain in the ass, so /portable is our choice.

 
Andrey Dik:

what about the /portable key?

and by the way, what are these folders "sdfgshndyueenerneb673756nr76,.t89.y80.tr76m5nbwb6qw6b3qvqvb6547nw8nme789m"? If there are several terminals installed, it's not an easy task to determine which folder belongs to which terminal. Of course, it is possible to enter them using MT tools, but in all other cases it is a real pain.

User has already once experimented and got files overwritten. I think that the second time he will not get burnt.
Reason: