L-I-V/MQL-Tools

null[Error] Result: 1 errors, 0 warnings

Opened this issue · 8 comments

I wasted a lot of time with this error message because I had no idea what was causing it.

I was compiling MQL5 with a bunch of included headers.. it would work with the syntax check but would give this error on compiling (both things done via your extension)

But then I copied my source code to metatrader and compiled it in MetaEditor, and now I see it doesn't have this error - it gives me regular error messages, so I can see what the problem is.

Therefore, my suggestion is that your extension detect this string null[Error] Result and if it detects it then write a line after it saying "please compile with MetaEditor to see the error messages"

Because if you don't know to do that, you can waste a lot of time. This is the first time I've seen this error, so it probably doesn't happen often.

Thanks.

if you saw my 2nd comment, that was wrong - I deleted it.

I don't know what causes this error I suspect it might just be that so many headers have been included it gets to be too much.. but when compiling with metaeditor it does show the actual errors. So my suggestion I think is a good one.

also I fixed some errors and now another variation of this message is:

[Error] Result: 1 errors, 0 warnings

now that I saw the errors in MetaEditor, I have fixed my code an it all compiles in vs code with the extension

L-I-V commented

Hi, mishaxz! Can you provide the log file that metaeditor creates when compiling from vscode when the "null[Error] Result" error occurs?

I'll see if I can recreate the error.. just fyi.. [Error] Result (i.e. without null prefix) can also occur with errors that you don't need to go to metaeditor to see what they are .. e.g. "can't open {include file}" I suggest you ignore my comments about [Error] Result (if there is no null prefix).. I might just have been mistaken when fixing the errors there. but about null [Error] Result what I said is correct

ok, I see what's going on here...

yes, in the log you can see the actual error. It is just in the output window of vs code, that it says null[Error] Result instead of displaying the actual error

Here is the console output and the log file, except I renamed filenames

LOG

d:\MetaTrader\MQL5\Experts\SBT\ProjectEA.mq5 : information: compiling 'ProjectEA.mq5'

bunch of include lines like this:

d:\MetaTrader\MQL5\Include\mqh1.mqh : information: including 'mqh1.mqh'

last line

d:\MetaTrader\MQL5\Include\Foo\FooResult.mqh(123,11) : error 111: function 'FooResult::description' must have a body
Result: 1 errors, 0 warnings

this is just one error but it could be different errors that are hidden in the console. the null is not caused specifically by this error. Once I fix this error, I would get another null [Error] Result until I fixed all of them.

CONSOLE OUTPUT

[Starting] [16:21:46] Compiling >>> ProjectEA.mq5 <<<


'ProjectEA.mq5'

Bunch of include files

'mqh1.mqh'
// etc.

last line

null[Error] Result: 1 errors, 0 warnings
L-I-V commented

I have identified the problem, and I will release an update with the fix soon.

great, I also forgot to mention in my output that when null [Error] Result occurs there are no errors listed before that message in the console output