Compile Errors and What They Mean
Every licensing compile error, its cause and the fix.
A wrong answer on the download page is designed to stop the compile, so an unprotected EA can never be built by mistake. Find your error below.
Errors and fixes
| MetaEditor says | Cause | Fix |
|---|---|---|
'start' - function already defined | Your EA is old-style but Old-style code was not ticked. | Download again with Old-style code ticked. |
'OnTick' - function already defined | You answered “no OnTick” but your EA has one. | Answer Yes to the OnTick question. |
'OnInit' - function already defined | You answered “No OnInit()” but your EA has one. | Correct the OnInit answer. |
'OnTimer' - function already defined | You answered “No OnTick() and no OnTimer()” but your EA has an OnTimer. | Answer “No, it runs on OnTimer()”. |
identifier already used near init or start | Old-style mode renames those words, including a variable of that name. | Rename the variable, or use Manual mode. |
An error where your code calls OnTimer(); or OnChartEvent(...) itself | The file guards those handlers; calling them directly cannot compile. | Move that logic into its own function and call that, or use Manual mode. |
cannot open include file | The .mqh is not in Include/FXNook/. | Extract the ZIP into the Include folder. |
FXNook: this licence file is included more than once | Two include lines. | Keep one, at the top. |
void function returns a value or function must have a body | The OnInit answer does not match (void vs int), or a function you said exists does not. | Download again with the correct answers. |
Warnings
Warnings from your own code (for example “deprecated”) are unrelated to licensing. The licensing file itself compiles with no warnings.
Was this guide helpful?
Thank you - that helps us improve these guides.
Need help?
Most questions are answered by the guides above. If yours is not, our team will help.
Open Support Ticket