Skip to content

Compilation Errors

Compilation Errors

MetaEdtior 5 shows error messages about the program errors detected by the built-in compiler during compilation. The list of these errors is given below in table. To compile a source code into an executable one, press F7. Programs that contain errors cannot be compiled until the errors identified by the compiler are eliminated.

CodeDescription
100File reading error
101Error of opening an *. EX4 for writing
103Not enough free memory to complete compilation
104Empty syntactic unit unrecognized by compiler
105Incorrect file name in #include
106Error accessing a file in #include (probably the file does not exist)
108Inappropriate name for #define
109Unknown command of preprocessor (valid #include, #define, #property, #import)
110Symbol unknown to compiler
111Function not implemented (description is present, but no body)
112Double quote (") omitted
113Opening angle bracket (<) or double quote (") omitted
114Single quote (’) omitted
115Closing angle bracket “>” omitted
116Type not specified in declaration
117No return operator or return is found not in all branches of the implementation
118Opening bracket of call parameters was expected
119Error writing EX4
120Invalid access to an array
121The function is not of void type and the return operator must return a value
122Incorrect declaration of the destructor
123Colon “:” is missing
124Variable is already declared
125Variable with such identifier already declared
126Variable name is too long (> 250 characters)
127Structure with such identifier already defined
128Structure is not defined
129Structure member with the same name already defined
130No such structure member
131Breached pairing of brackets
132Opening parenthesis “(” expected
133Unbalanced braces (no “}”)
134Difficult to compile (too much branching, internal stack levels are overfilled)
135Error of file opening for reading
136Not enough memory to download the source file into memory
137Variable is expected
138Reference cannot be initialized
140Assignment expected (appears at declaration)
141Opening brace “{” expected
142Parameter can be a dynamic array only
143Use of “void” type is unacceptable
144No pair for “)” or “]”, i.e. “(or” [ " is absent
145No pair for “(or” [ “, i.e. “) “or”] " is absent
146Incorrect array size
147Too many parameters (> 64)
149This token is not expected here
150Invalid use of operation (invalid operands)
151Expression of void type not allowed
152Operator is expected
153Misuse of break
154Semicolon “;” expected
155Comma “,” expected
156Must be a class type, not struct
157Expression is expected
158“non HEX character” found in HEX or too long number (number of digits> 511)
159String-constant has more than 65534 characters
160Function definition is unacceptable here
161Unexpected end of program
162Forward declaration is prohibited for structures
163Function with this name is already defined and has another return type
164Function with this name is already defined and has a different set of parameters
165Function with this name is already defined and implemented
166Function overload for this call was not found
167Function with a return value of void type cannot return a value
168Function is not defined
170Value is expected
171In case expression only integer constants are valid
172The value of case in this switch is already used
173Integer is expected
174In #import expression file name is expected
175Expressions are not allowed on global level
176Omitted parenthesis “)” before “;”
177To the left of equality sign a variable is expected
178The result of expression is not used
179Declaring of variables is not allowed in case
180Implicit conversion from a string to a number
181Implicit conversion of a number to a string
182Ambiguous call of an overloaded function (several overloads fit)
183Illegal else without proper if
184Invalid case or default without a switch
185Inappropriate use of ellipsis
186The initializing sequence has more elements than the initialized variable
187A constant for case expected
188A constant expression required
189A constant variable cannot be changed
190Closing bracket or a comma is expected (declaring array member)
191Enumerator identifier already defined
192Enumeration cannot have access modifiers (const, extern, static)
193Enumeration member already declared with a different value
194There is a variable defined with the same name
195There is a structure defined with the same name
196Name of enumeration member expected
197Integer expression expected
198Division by zero in constant expression
199Wrong number of parameters in the function
200Parameter by reference must be a variable
201Variable of the same type to pass by reference expected
202A constant variable cannot be passed by a non-constant reference
203Requires a positive integer constant
204Failed to access protected class member
205Import already defined in another way
208Executable file not created
209‘OnCalculate’ entry point not found for the indicator
210The continue operation can be used only inside a loop
211Error accessing private (closed) class member
213Method of structure or class is not declared
214Error accessing private (closed) class method
216Copying of structures with objects is not allowed
218Index out of array range
219Array initialization in structure or class declaration not allowed
220Class constructor cannot have parameters
221Class destructor can not have parameters
222Class method or structure with the same name and parameters have already been declared
223Operand expected
224Class method or structure with the same name exists, but with different parameters (declaration!=implementation)
225Imported function is not described
226ZeroMemory() is not allowed for objects with protected members or inheritance
227Ambiguous call of the overloaded function (exact match of parameters for several overloads)
228Variable name expected
229A reference cannot be declared in this place
230Already used as the enumeration name
232Class or structure expected
235Cannot call ‘delete’ operator to delete the array
236Operator ’ while’ expected
237Operator ‘delete’ must have a pointer
238There is ‘default’ for this ‘switch’ already
239Syntax error
240Escape-sequence can occur only in strings (starts with ‘\’)
241Array required - square bracket ‘[’ does not apply to an array, or non arrays are passed as array parameters
242Can not be initialized through the initialization sequence
243Import is not defined
244Optimizer error on the syntactic tree
245Declared too many structures (try to simplify the program)
246Conversion of the parameter is not allowed
247Incorrect use of the ‘delete’ operator
248It’s not allowed to declare a pointer to a reference
249It’s not allowed to declare a reference to a reference
250It’s not allowed to declare a pointer to a pointer
251Structure declaration in the list of parameter is not allowed
252Invalid operation of typecasting
253A pointer can be declared only for a class or structure
256Undeclared identifier
257Executable code optimizer error
258Executable code generation error
260Invalid expression for the ‘switch’ operator
261Pool of string constants overfilled, simplify program
262Cannot convert to enumeration
263Do not use ‘virtual’ for data (members of a class or structure)
264Cannot call protected method of class
265Overridden virtual functions return a different type
266Class cannot be inherited from a structure
267Structure cannot be inherited from a class
268Constructor cannot be virtual (virtual specifier is not allowed)
269Method of structure cannot be virtual
270Function must have a body
271Overloading of system functions (terminal functions) is prohibited
272Const specifier is invalid for functions that are not members of a class or structure
274Not allowed to change class members in constant method
276Inappropriate initialization sequence
277Missed default value for the parameter (specific declaration of default parameters)
278Overriding the default parameter (different values in declaration and implementation)
279Not allowed to call non-constant method for a constant object
280An object is necessary for accessing members (a dot for a non class/structure is set)
281The name of an already declared structure cannot be used in declaration
284Unauthorized conversion (at closed inheritance)
285Structures and arrays cannot be used as input variables
286Const specifier is not valid for constructor/destructor
287Incorrect string expression for a datetime
288Unknown property (#property)
289Incorrect value of a property
290Invalid index for a property in #property
291Call parameter omitted - <func (x,)>
293Object must be passed by reference
294Array must be passed by reference
295Function was declared as exportable
296Function was not declared as exportable
297It is prohibited to export imported function
298Imported function cannot have this parameter (prohibited to pass a pointer, class or structure containing a dynamic array, pointer, class, etc.)
299Must be a class
300#import was not closed
302Type mismatch
303Extern variable is already initialized
304No exported function or entry point found
305Explicit constructor call is not allowed
306Method was declared as constant
307Method was not declared as constant
308Incorrect size of the resource file
309Incorrect resource name
310Resource file opening error
311Resource file reading error
312Unknown resource type
313Incorrect path to the resource file
314The specified resource name is already used
315Argument expected for the function-like macro
316Unexpected symbol in macro definition
317Error in formal parameters of the macro
318Invalid number of parameters for a macro
319Too many parameters for a macro
320Too complex, simplify the macro
321Parameter for EnumToString() can be only an enumeration
322The resource name is too long
323Unsupported image format (only BMP with 24 or 32 bit color depth is supported)
324An array cannot be declared in operator
325The function can be declared only in the global scope
326The declaration is not allowed for the current scope
327Initialization of static variables with the values of local variables is not allowed
328Illegal declaration of an array of objects that do not have a default constructor
329Initialization list allowed only for constructors
330No function definition after initialization list
331Initialization list is empty
332Array initialization in a constructor is not allowed
333Initializing members of a parent class in the initialization list is not allowed
334Expression of the integer type expected
335Memory required for the array exceeds the maximum value
336Memory required for the structure exceeds the maximum value
337Memory required for the variables declared on the global level exceeds the maximum value
338Memory required for local variables exceeds the maximum value
339Constructor not defined
340Invalid name of the icon file
341Could not open the icon file at the specified path
342The icon file is incorrect and is not of the ICO format
343Reinitialization of a member in a class/structure constructor using the initialization list
344Initialization of static members in the constructor initialization list is not allowed
345Initialization of a non-static member of a class/structure on a global level is not allowed
346The name of the class/structure method matches the name of an earlier declared member
347The name of the class/structure member matches the name of an earlier declared method
348Virtual function cannot be declared as static
349The const modifier is not allowed for static functions
350Constructor or destructor cannot be static
351Non-static member/method of a class or a structure cannot be accessed from a static function
352An overload operation (+,-,[],++,– etc.) is expected after the operator keyword
353Not all operations can be overloaded in MQL4
354Definition does not match declaration
355An invalid number of parameters is specified for the operator
356Event handling function not found
357Method cannot be exported
358A pointer to the constant object cannot be normalized by a non-constant object
359Class templates are not supported yet
360Function template overload is not supported yet
361Function template cannot be applied
362Ambiguous parameter in function template (several parameter types can be applied)
363Unable to determine the parameter type, by which the function template argument should be normalized
364Incorrect number of parameters in the function template
365Function template cannot be virtual
366Function templates cannot be exported
367Function templates cannot be imported
368Structures containing the objects are not allowed
369String arrays and structures containing the objects are not allowed
370A static class/structure member must be explicitly initialized
371Compiler limitation: the string cannot contain more than 65 535 characters
372Inconsistent #ifdef/#endif
373Object of class cannot be returned, copy constructor not found
374Non-static members and methods cannot be used
375OnTesterInit() impossible to use without OnTesterDeinit()
376Redefinition of formal parameter ‘%s’
377Macro FUNCSIG and FUNCTION cannot appear outside of a function body
378Invalid returned type. For example, this error will be produced for functions imported from DLL that return structure or pointer.
379Template usage error
380Not used
381Illegal syntax when declaring pure virtual function, only “=NULL” or “=0” are allowed
382Only virtual functions can be declared with the pure-specifier ("=NULL” or “=0”)
383Abstract class cannot be instantiated
384A pointer to a user-defined type should be applied as a target type for dynamic casting using the dynamic_cast operator
385“Pointer to function” type is expected
386Pointers to methods are not supported
387Error – cannot define the type of a pointer to function
388Type cast is not available due to private inheritance
389A variable with const modifier should be initialized during declaration
Last updated on