
I am studying the language mql4 from the website http://book.mql4.com/basics/functions. But when I type in a simple function (even if I type exactly as indicated from the tutorial) I get errors when I try to compile it. I am wondering if the tutorial may be outdated? Maybe there have been updates to the language since the tutorial was written?
Or maybe I am missing something.
This is an example of a simple function. That I get errors on.
int Gipo(int a, int b)
{
int c2=a*a + b*b;
int c=MathSqrt(c2);
return(c);
}
These are the errors that the compiler returns.
'(' function definition unexpected
'c2' variable not defined
'}' unbalanced paranthesis
I type the code exactly as indicated and modify it in every way that I can think of but still get errors. I have tried other more simpel functions as well and always get similar errors. Please Help! Its driving me nuts!
Thanks, Brian.