|
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.
Code |
Description |
---|---|
File reading error |
|
Error of opening an *. EX5 for writing |
|
Not enough free memory to complete compilation |
|
Empty syntactic unit unrecognized by compiler |
|
Incorrect file name in #include |
|
Error accessing a file in #include (probably the file does not exist) |
|
Inappropriate name for #define |
|
Unknown command of preprocessor (valid #include, #define, #property, #import) |
|
Symbol unknown to compiler |
|
Function not implemented (description is present, but no body) |
|
Double quote (") omitted |
|
Opening angle bracket (<) or double quote (") omitted |
|
Single quote (') omitted |
|
Closing angle bracket ">" omitted |
|
Type not specified in declaration |
|
No return operator or return is found not in all branches of the implementation |
|
Opening bracket of call parameters was expected |
|
Error writing EX5 |
|
Invalid access to an array |
|
The function is not of void type and the return operator must return a value |
|
Incorrect declaration of the destructor |
|
Colon ":" is missing |
|
Variable is already declared |
|
Variable with such identifier already declared |
|
Variable name is too long (> 250 characters) |
|
Structure with such identifier already defined |
|
Structure is not defined |
|
Structure member with the same name already defined |
|
No such structure member |
|
Breached pairing of brackets |
|
Opening parenthesis "(" expected |
|
Unbalanced braces (no "}") |
|
Difficult to compile (too much branching, internal stack levels are overfilled) |
|
Error of file opening for reading |
|
Not enough memory to download the source file into memory |
|
Variable is expected |
|
Reference cannot be initialized |
|
Assignment expected (appears at declaration) |
|
Opening brace "{" expected |
|
Parameter can be a dynamic array only |
|
Use of "void" type is unacceptable |
|
No pair for ")" or "]", i.e. "(or" [ " is absent |
|
No pair for "(or" [ ", i.e. ") "or"] " is absent |
|
Incorrect array size |
|
Too many parameters (> 64) |
|
This token is not expected here |
|
Invalid use of operation (invalid operands) |
|
Expression of void type not allowed |
|
Operator is expected |
|
Misuse of break |
|
Semicolon ";" expected |
|
Comma "," expected |
|
Must be a class type, not struct |
|
Expression is expected |
|
"non HEX character" found in HEX or too long number (number of digits> 511) |
|
String-constant has more than 65534 characters |
|
Function definition is unacceptable here |
|
Unexpected end of program |
|
Forward declaration is prohibited for structures |
|
Function with this name is already defined and has another return type |
|
Function with this name is already defined and has a different set of parameters |
|
Function with this name is already defined and implemented |
|
Function overload for this call was not found |
|
Function with a return value of void type cannot return a value |
|
Function is not defined |
|
Value is expected |
|
In case expression only integer constants are valid |
|
The value of case in this switch is already used |
|
Integer is expected |
|
In #import expression file name is expected |
|
Expressions are not allowed on global level |
|
Omitted parenthesis ")" before ";" |
|
To the left of equality sign a variable is expected |
|
The result of expression is not used |
|
Declaring of variables is not allowed in case |
|
Implicit conversion from a string to a number |
|
Implicit conversion of a number to a string |
|
Ambiguous call of an overloaded function (several overloads fit) |
|
Illegal else without proper if |
|
Invalid case or default without a switch |
|
Inappropriate use of ellipsis |
|
The initializing sequence has more elements than the initialized variable |
|
A constant for case expected |
|
A constant expression required |
|
A constant variable cannot be changed |
|
Closing bracket or a comma is expected (declaring array member) |
|
Enumerator identifier already defined |
|
Enumeration cannot have access modifiers (const, extern, static) |
|
Enumeration member already declared with a different value |
|
There is a variable defined with the same name |
|
There is a structure defined with the same name |
|
Name of enumeration member expected |
|
Integer expression expected |
|
Division by zero in constant expression |
|
Wrong number of parameters in the function |
|
Parameter by reference must be a variable |
|
Variable of the same type to pass by reference expected |
|
A constant variable cannot be passed by a non-constant reference |
|
Requires a positive integer constant |
|
Failed to access protected class member |
|
Import already defined in another way |
|
Executable file not created |
|
'OnCalculate' entry point not found for the indicator |
|
The continue operation can be used only inside a loop |
|
Error accessing private (closed) class member |
|
Method of structure or class is not declared |
|
Error accessing private (closed) class method |
|
Copying of structures with objects is not allowed |
|
Index out of array range |
|
Array initialization in structure or class declaration not allowed |
|
Class constructor cannot have parameters |
|
Class destructor can not have parameters |
|
Class method or structure with the same name and parameters have already been declared |
|
Operand expected |
|
Class method or structure with the same name exists, but with different parameters (declaration!=implementation) |
|
Imported function is not described |
|
ZeroMemory() is not allowed for objects with protected members or inheritance |
|
Ambiguous call of the overloaded function (exact match of parameters for several overloads) |
|
Variable name expected |
|
A reference cannot be declared in this place |
|
Already used as the enumeration name |
|
Class or structure expected |
|
Cannot call 'delete' operator to delete the array |
|
Operator ' while' expected |
|
Operator 'delete' must have a pointer |
|
There is 'default' for this 'switch' already |
|
Syntax error |
|
Escape-sequence can occur only in strings (starts with '\') |
|
Array required - square bracket '[' does not apply to an array, or non arrays are passed as array parameters |
|
Can not be initialized through the initialization sequence |
|
Import is not defined |
|
Optimizer error on the syntactic tree |
|
Declared too many structures (try to simplify the program) |
|
Conversion of the parameter is not allowed |
|
Incorrect use of the 'delete' operator |
|
It's not allowed to declare a pointer to a reference |
|
It's not allowed to declare a reference to a reference |
|
It's not allowed to declare a pointer to a pointer |
|
Structure declaration in the list of parameter is not allowed |
|
Invalid operation of typecasting |
|
A pointer can be declared only for a class or structure |
|
Undeclared identifier |
|
Executable code optimizer error |
|
Executable code generation error |
|
Invalid expression for the 'switch' operator |
|
Pool of string constants overfilled, simplify program |
|
Cannot convert to enumeration |
|
Do not use 'virtual' for data (members of a class or structure) |
|
Cannot call protected method of class |
|
Overridden virtual functions return a different type |
|
Class cannot be inherited from a structure |
|
Structure cannot be inherited from a class |
|
Constructor cannot be virtual (virtual specifier is not allowed) |
|
Method of structure cannot be virtual |
|
Function must have a body |
|
Overloading of system functions (terminal functions) is prohibited |
|
Const specifier is invalid for functions that are not members of a class or structure |
|
Not allowed to change class members in constant method |
|
Inappropriate initialization sequence |
|
Missed default value for the parameter (specific declaration of default parameters) |
|
Overriding the default parameter (different values in declaration and implementation) |
|
Not allowed to call non-constant method for a constant object |
|
An object is necessary for accessing members (a dot for a non class/structure is specified) |
|
The name of an already declared structure cannot be used in declaration |
|
Unauthorized conversion (at closed inheritance) |
|
Structures and arrays cannot be used as input variables |
|
Const specifier is not valid for constructor/destructor |
|
Incorrect string expression for a datetime |
|
Unknown property (#property) |
|
Incorrect value of a property |
|
Invalid index for a property in #property |
|
Call parameter omitted - <func (x,)> |
|
Object must be passed by reference |
|
Array must be passed by reference |
|
Function was declared as exportable |
|
Function was not declared as exportable |
|
It is prohibited to export imported function |
|
Imported function cannot have this parameter (prohibited to pass a pointer, class or structure containing a dynamic array, pointer, class, etc.) |
|
Must be a class |
|
#import was not closed |
|
Type mismatch |
|
Extern variable is already initialized |
|
No exported function or entry point found |
|
Explicit constructor call is not allowed |
|
Method was declared as constant |
|
Method was not declared as constant |
|
Incorrect size of the resource file |
|
Incorrect resource name |
|
Resource file opening error |
|
Resource file reading error |
|
Unknown resource type |
|
Incorrect path to the resource file |
|
The specified resource name is already used |
|
Argument expected for the function-like macro |
|
Unexpected symbol in macro definition |
|
Error in formal parameters of the macro |
|
Invalid number of parameters for a macro |
|
Too many parameters for a macro |
|
Too complex, simplify the macro |
|
Parameter for EnumToString() can be only an enumeration |
|
The resource name is too long |
|
Unsupported image format (only BMP with 24 or 32 bit color depth is supported) |
|
An array cannot be declared in operator |
|
The function can be declared only in the global scope |
|
The declaration is not allowed for the current scope |
|
Initialization of static variables with the values of local variables is not allowed |
|
Illegal declaration of an array of objects that do not have a default constructor |
|
Initialization list allowed only for constructors |
|
No function definition after initialization list |
|
Initialization list is empty |
|
Array initialization in a constructor is not allowed |
|
Initializing members of a parent class in the initialization list is not allowed |
|
Expression of the integer type expected |
|
Memory required for the array exceeds the maximum value |
|
Memory required for the structure exceeds the maximum value |
|
Memory required for the variables declared on the global level exceeds the maximum value |
|
Memory required for local variables exceeds the maximum value |
|
Constructor not defined |
|
Invalid name of the icon file |
|
Could not open the icon file at the specified path |
|
Reinitialization of a member in a class/structure constructor using the initialization list |
|
Initialization of static members in the constructor initialization list is not allowed |
|
Initialization of a non-static member of a class/structure on a global level is not allowed |
|
The name of the class/structure method matches the name of an earlier declared member |
|
The name of the class/structure member matches the name of an earlier declared method |
|
Constructor or destructor cannot be static |
|
Non-static member/method of a class or a structure cannot be accessed from a static function |
|
An overload operation (+,-,[],++,-- etc.) is expected after the operator keyword |
|
Not all operations can be overloaded in MQL5 |
|
Definition does not match declaration |
|
An invalid number of parameters is specified for the operator |
|
Event handling function not found |
|
Method cannot be exported |
|
A pointer to the constant object cannot be normalized by a non-constant object |
|
Class templates are not supported yet |
|
Function template overload is not supported yet |
|
Function template cannot be applied |
|
Ambiguous parameter in function template (several parameter types can be applied) |
|
Unable to determine the parameter type, by which the function template argument should be normalized |
|
Incorrect number of parameters in the function template |
|
Function template cannot be virtual |
|
Function templates cannot be exported |
|
Function templates cannot be imported |
|
Structures containing the objects are not allowed |
|
String arrays and structures containing the objects are not allowed |
|
A static class/structure member must be explicitly initialized |
|
Compiler limitation: the string cannot contain more than 65 535 characters |
|
Inconsistent #ifdef/#endif |
|
Object of class cannot be returned, copy constructor not found |
|
Non-static members and methods cannot be used |
|
OnTesterInit() impossible to use without OnTesterDeinit() |
|
Redefinition of formal parameter '%s' |
|
Macro __FUNCSIG__ and __FUNCTION__ cannot appear outside of a function body |
|
Invalid returned type. For example, this error will be produced for functions imported from DLL that return structure or pointer. |
|
Template usage error |
|
Not used |
|
Illegal syntax when declaring pure virtual function, only "=NULL" or "=0" are allowed |
|
Only virtual functions can be declared with the pure-specifier ("=NULL" or "=0") |
|
Abstract class cannot be instantiated |
|
A pointer to a user-defined type should be applied as a target type for dynamic casting using the dynamic_cast operator |
|
"Pointer to function" type is expected |
|
Pointers to methods are not supported |
|
Error – cannot define the type of a pointer to function |
|
Type cast is not available due to private inheritance |
|
A variable with const modifier should be initialized during declaration |
|
Only methods with public access can be declared in an interface |
|
Invalid nesting of an interface inside of another interface |
|
An interface can only be derived from another interface |
|
An interface is expected |
|
Interfaces only support public inheritance |
|
An interface cannot contain members |
|
Interface objects cannot be created directly, only use inheritance |
|
A specifier cannot be used in a forward declaration |
|
Inheritance from the class is impossible, since it is declared with the final specifier |
|
The final specifier can be applied only to virtual functions |
|
The method marked by the override specifier actually does not override any base class function |
|
A specifier is not allowed in defining a function, but only in declaring |
|
Cannot cast the type to the specified one |
|
The type cannot be used for a resource variable |
|
Error in the project file |
|
Cannot be used as a union member |
|
Ambiguous choice for the name, the usage context should be explicitly defined |
|
The structure cannot be used from DLL |
|
Cannot call a function marked by the delete specifier |
|
MQL4 is not supported. To compile this program, use MetaEditor from your MetaTrader 4 installation folder |