you didnt close the if 10 }
Because Print("I'm printing the else") works if x is not equal to 10 .
But now x is equal 10 .
Arash Lakzadeh:
Because Print("I'm printing the else") works if x is not equal to 10 .
But now x is equal 10
Thanks Arash;
I just figured it out.
Chukwueloka Okafor-Ezisi:
Thanks Arash;
I just figured it out.
You're welcome.
Good luck
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello community, please my "else" statement is not printing on the mt4. Below is the code:
void OnStart()
{
//---
int x = 10;
int y = 100;
if (x == 10) {
Print(x);
Print("I hate Mondays");
Print("I love Fridays");
if(y == 100) {
Print("I just printed a nested if");
}
} else {
Print("I'm printing the else");
}
The "Print("I'm printing the else"); is not executing.
What could be wrong please?
Thanks.