'else' expressions are not allowed on a global space
RJ Adams:
I keep getting this error along with '}' expressions are not allowed on a global space as well.
I wrote a function in an include file and am trying to call it from main OnStart program. The function worked just fine before putting it into the include file so I can't understand what the issue is. This is the function.
This is my main program
Please help
void GetDate(); <--remove { MqlDateTime dt; TimeCurrent(dt); if(dt.day_of_week == 0) { Alert("It is Sunday"); } else if (dt.day_of_week ==1) { Alert("It is Monday"); } else { Alert("Blah"); } }
Kenneth Parling:
oof. Newbie mistake. lol thank you
RJ Adams:
oof. Newbie mistake. lol thank you
oof. Newbie mistake. lol thank you
you're welcome ;-)
I keep getting this error along with '}' expressions are not allowed on a global space as well.
I wrote a function in an include file and am trying to call it from main OnStart program. The function worked just fine before putting it into the include file so I can't understand what the issue is. This is the function.
This is my main program
Please help