compile does not reset variables New comment wertop 2014.05.22 15:47 Does anybody face the problem, that after compile external values are not "reset" to the ones in EA? Here is an very simple example: #property copyright "Copyright 2014, MetaQuotes Software Corp."#property link "https://www.mql5.com"#property version "1.00"#property strict//--- input parametersextern string Comment="Test12";//+------------------------------------------------------------------+//| Expert initialization function |//+------------------------------------------------------------------+int OnInit() {//--- Print(Comment); //--- return(INIT_SUCCEEDED); }//+------------------------------------------------------------------+//| Expert deinitialization function |//+------------------------------ After compile I change the value to "Test1" in the code, compile again, it still prints "Test12".What is wrong?? Questions from Beginners MQL4 MT4 MetaTrader 4 Programing EAs in Windows Vista What is different between extern and input wertop 2014.05.23 10:47 #1 Nobody has a suggestion? Am I doing something not right? Keith Watford 2014.05.23 12:07 #2 Already discussedhttps://forum.mql4.com/62975 wertop 2014.05.23 12:25 #3 Thank you. That is what I was looking for! New comment
Does anybody face the problem, that after compile external values are not "reset" to the ones in EA?
Here is an very simple example:
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
//--- input parameters
extern string Comment="Test12";
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---
Print(Comment);
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------
After compile I change the value to "Test1" in the code, compile again, it still prints "Test12".
What is wrong??