Question : internal error #-1017 (MetaEditor)

 

I came across a MT4 EA with approximately 10,700 lines of code and 1140 functions. I know this is a ridiculously large file and number of functions.

When I complile the file, it compiles fine (no errors), but I get an error internal error #-1017

So my questions are :
1) What is the cause of this internal error 1017 ?

2) What is the maximum number of variables, or functions allowed by MT4 ?

 

I am using MetaEditor version 5.00 build 1150 version 2015. 

 

If the complier gives an internal error, it does not compile fine, it didn't compile at all.

The compiler got totally confused. Likely a missing parenthesis or bracket. Put a #ifdef whr / #endif around half and fix errors in the other half.

 

Something wrong with imports.

Please write to the ServiceDesk.

 
WHRoeder:

If the complier gives an internal error, it does not compile fine, it didn't compile at all.

The compiler got totally confused. Likely a missing parenthesis or bracket. Put a #ifdef whr / #endif around half and fix errors in the other half.

It compiles (syntactically) perfectly fine. It seems to complain at the end of the compilation. There are no #includes, or #ifdef or pre-processor directives.

For example, if I deliberately introduce syntactical errors in the indicator, it points out those errors precisely. In this case it does not complain of internal error #-1017.

E.g., I randomly added "int x = 4" (missing semi-colon error) in the init() function. It pointed out that error correctly (semi-colon expected) and did not show the internal error #-1017.

 

Here is the indicator attached (TestIndicator.mq4).

It was generated from some template software - has around 11,700 lines of code and around 1140 functions. It is  bloated and perhaps useless (and I have no idea what it does).

I am just trying to understand what is the cause of the internal error #-1017 

 

I suspect MT4 has a limitation of 1024 (or something close by) functions, because if I comment out a few functions it compiles perfectly fine. 

Files:
 
adheer:

Here is the indicator attached (TestIndicator.mq4).

It was generated from some template software - has around 11,700 lines of code and around 1140 functions. It is  bloated and perhaps useless (and I have no idea what it does).

I am just trying to understand what is the cause of the internal error #-1017 

 

I suspect MT4 has a limitation of 1024 (or something close by) functions, because if I comment out a few functions it compiles perfectly fine. 

Thank you for the code.

I found error in the line 3387

    if ((iCustom(NULL, NULL, NULL, PERIOD_M1, "TL_BUY_Entry_Fast_MA_1",0,2)

Third parameter is NULL, this is incorrect. Рlease check it.

The compiler has been fixed. This error will not appear in the next compiler build.
 
mql5:
Thank you for the code.

I found error in the line 3387


Third parameter is NULL, this is incorrect. Рlease check it.

The compiler has been fixed. This error will not appear in the next compiler build.

You are right, that seems to be the problem.

 

Thank you very much. 

Reason: