Errors, bugs, questions - page 1123

 
Fleder:

TheGetLastError function is for runtime errors.

Interested in compilation errors.

You can not get the compilation error number in MetaEditore, but if there is a compilation error, there is an error description in the "Errors" tab. If you don't understand the description, then copy the message and translate it in the translator :).
 

I found a description of the errors. But where can I see the error numbers?

I can't see them anywhere in MetaEditor...

 
barabashkakvn:
You cannot get the compilation error number in MetaEditore, but when a compilation error occurs, there is an error description in the "Errors" tab. If you don't understand the description, then copy the message and translate it in translator :).
I am doing so, but it is somehow "crooked". I will try to apply to Service Desk to add such a column in the window "Tools" in the tab "Errors" in the editor.
 
Fleder:
I do, but it's a bit "crooked". I will try to apply to servicedesk to add such a column in the "Tools" window in the "Errors" tab of the editor.
Compilation errors is a very loud name. They are more likely to be reports of oversight. By the way, the description about the error is very clear. Personally, I think the error number only takes time - copy the error number, then go to help, then find the number...
 
Fleder:
There is no point in an infinite loop. To make a limited number of attempts and thenreturnINIT_FAILED inint OnInit() function.
It makes sense, but I wouldn't want the indicator to crash because of such nonsense. Ok, I'll write it in code.
 

Do you think it would be quicker to translate the English text about an error or warning in a crude google translator, and then look for matches in the help, where these descriptions are in Russian?

And not everyone can "intuitively" understand a message about an oversight "in bourgeois".

 
Fleder:

Do you think it would be quicker to translate the English text about an error or warning in a crude google translator, and then look for matches in the help, where these descriptions are in Russian?

And not everyone can "intuitively" understand a message about an oversight "in bourgeois".

Give code (code is inserted with "SRC" button) and error message. English is the official language in which programs are written all over the world.
 
Fleder:

Do you think it would be quicker to translate the English text about an error or warning in a crude google translator, and then look for matches in the help, where these descriptions are in Russian?

And not everyone can "intuitively" understand the error message "in bourgeois".

Here is a simple example of how having commented out just one symbol you can get three errors at once.

//+------------------------------------------------------------------+
//|                                                  test_script.mq5 |
//|                              Copyright © 2014, Vladimir Karputov |
//|                                           http://wmua.ru/slesar/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2014, Vladimir Karputov"
#property link      "http://wmua.ru/slesar/"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  //{
//---
   Print(__FUNCTION__);
  }
//+------------------------------------------------------------------+

You get three errors at once:

'test_script.mq5'       test_script.mq5 1       1
'Print' - semicolon expected    test_script.mq5 15      4
'Print' - declaration without type      test_script.mq5 15      4
'}' - expressions are not allowed on a global scope     test_script.mq5 16      3
3 error(s), 0 warning(s)                4       1                        

And if there were error numbers, do you think it would be easier to find the source of the error?

 
barabashkakvn:
Give the code (code is inserted using the "SRC" button) and the error message. English is the official language in which programs are written all over the world.

Personally, I have no trouble finding gross errors in the code that the compiler "swears" at. Neither, I presume, do you. But what about newcomers?

In fact, if the documentation handles compilation errors by numbers, it would be reasonable to provide

the opportunity to know the numbers of these very errors in the editor when you make them at random.

 
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   float num;
   num=13.7;         //так получаем предупреждение truncation of constant value sample.mq5      9       8
   num=(float)13.7;  //а так всё в порядке
  }
//+------------------------------------------------------------------+

The compiler treats the number 13.7 as the double type. But at the same time this number can be losslessly converted to the float type

and this warning is unnecessary.

Reason: