Did you put a semicolon?
- Post all relevant code. The opening function so we know the context. Your first line won't compile.
- If you are printing a lot of lines, the tab will not show all of them. Right Click → Open and look at the file.
Everything compiles fine and I confirm the second string isn't printed.
void okay() { strange(); Print("FUNCTION WAS CALLED"); } void strange() { Print("BEGIN"); // remaining code } okay();> "FUNCTION WAS CALLED" // output
> // end of output
Everything compiles fine and I confirm the second string isn't printed.
> "FUNCTION WAS CALLED" // output> // end of output
Where is
okay();
in your code, seems to be outside of any function.
Is the code compiling?
There is something wrong with your code or positioning of okay(), because if it is inside OnTick(), "BEGIN" will be printed.
Keith Watford:
Is the code compiling?
Like I said already, everything compiles fine.
okay() seems to be outside of any function.
There is something wrong with your code or positioning of okay(), because if it is inside OnTick(), "BEGIN" will be printed.
Moderator's Note: This post was edited by the OP some time after so at the time Nobody was aware that the okay() function was from a library when replying.
I only posted the relevant code; okay() is called
from OnTick(). Edit: Actually, it is called from another function in the same library, which in turn is called from OnTick(),
but it doesn't make any difference.
// ----- EA.mq4 ----- #include <MyLib.mqh> OnTick() { Other_Function(); }
// ----- MyLib.mqh ----- void Other_Function() { okay(); }
Things are much simpler when there's something wrong
with my code.
Like I said already, everything compiles fine.
I just posted the relevant code; okay() is called from OnTick().
Things are much simpler when there's something wrong with my code.
Well, there is something wrong in your code somewhere, because if okay() is called, "BEGIN" will print.
Well, there is something wrong in your code somewhere, because if okay() is called, "BEGIN" will print.
You think logically about something that doesn't make any sense. Been there done that.
You can't say there is something wrong with my code when there is obviously nothing wrong with it.
Everybody can see it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I don't understand at all. How is it possible?
A line of code calls a function with:
at the very top.
Below the function call there is:
The program prints FUNCTION WAS CALLED but NOT BEGIN !
All files are freshly compiled and there is only one function with that name.