As I am new to MQL4 so sometimes I will ask too basic questions, hope you dont mind. I did compile the progeam and I dont know why it display an error.
As I am new to MQL4 so sometimes I will ask too basic questions, hope you dont mind. I did compile the progeam and I dont know why it display an error.
It displays an error because it seems that "not all control paths return a value" is an error now and not a warning anymore. - Just put a
return0;
statement as the last statement in start().
In general, if a function is declared and/or defined to return a value (non void function), then it has to do so.
And if you want to code in mql you basically need to know how to code in c++, since mql is a subset of c++, where all of the program flow, declarations and definitions etc are virtually the same.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Dear WHRoeder,
As I am new to MQL4 so sometimes I will ask too basic questions, hope you dont mind. I did compile the progeam and I dont know why it display an error.
As I am new to MQL4 so sometimes I will ask too basic questions, hope you dont mind. I did compile the progeam and I dont know why it display an error.
It displays an error because it seems that "not all control paths return a value" is an error now and not a warning anymore. - Just put a
statement as the last statement in start().
In general, if a function is declared and/or defined to return a value (non void function), then it has to do so.
And if you want to code in mql you basically need to know how to code in c++, since mql is a subset of c++, where all of the program flow, declarations and definitions etc are virtually the same.
Read the book: https://book.mql4.com/