Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 472
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
'}' - not all control paths return a value
highlights such an error in the function..... though it returns a value and works fine in another indicator without this error
'}' - not all control paths return a value
highlights such an error in the function..... though it returns a value and works fine in another indicator without this error
Open in a new editor, highlight the first bracket and check the last one, you will see everything at once.
Can you tell me if it is possible to arrange a step-by-step run of the program in debug mode? And add more variables for tracking
'}' - not all control paths return a value
the function..... although it returns a value and works fine in another indicator without this error
This is a message telling you that there are branching options in the function when it might not return anything. For example:
The value of the a variable seems to be limited in the range from 0 to 2, but the compiler still considers this an error.
Put return() with default return value from the function before the closing parenthesis of the function body and everything will be fine:
This tells you that there are branching options in the function when it may not return anything. For example:
The a variable's value seems to be limited in the range from 0 to 2, but the compiler still considers it an error.
Put return() before the closing parenthesis of the function body with the default return value from the function and all will be grain gut:
What if a is not an int type?
function type - return value at the end of the function
This tells you that there are branching options in the function when it may not return anything. For example:
The value of variable a seems to be limited to a range from 0 to 2, but the compiler still considers it an error.
Put return() before the closing parenthesis of the function body with the default return value from the function and all will be grain gut:
thanks a lot..... saved my nerves
What if a person's type is not int?
the function type is the return result at the end of the function
What was that about? I just gave an example - the first thing that popped into my head. You could have written a function returning any other data type (except void)... It doesn't change the point.
I was just clarifying the data type. This is a branch of questions from newbies, so they expect the same return in any function
Help with the bugs!
I decided to make an EA for myself on the basis of an example from the mql4 manual. I've been messing with it for a week now, but it always gives me some kind of error.
Please check what may be wrong, maybe something should be changed or removed in addition to brackets.
Errors:
'}' - unexpected end of program expert.mq4 218 3
'{' - unbalanced parentheses expert.mq4 23 2
Help with the bugs!
I decided to make an EA for myself on the basis of an example from the mql4 manual. I've been messing with it for a week now, but it always gives me some kind of error.
Please check what may be wrong, maybe something should be changed or removed in addition to brackets.
Errors:
'}' - unexpected end of program expert.mq4 218 3
'{' - unbalanced parentheses expert.mq4 23 2
Try translating what is written in the errors. I think this is the easiest way to find out the cause of the error
What does this do at the start?
You have an Expert Advisor, not an indicator.
why isn't the type specified?
where is the closing parenthesis?
What is this news?
Show me where it is written in the example?
why is there a comma at the end and not a semicolon? why write the same thing twice?
You put a comma, write it that way:
What is it?
I didn't look any further, I got tired,
So don't blame the mistakes. They're due to your inattention. You need to read the help once again, and watch the video to read an article on how to program in this language.