Errors, bugs, questions - page 1122

 
Lone_Irbis:

In the process of poking around the ways of writing data to the file from the tester, here's the error (shortened, because it didn't fit):

That is, of course, I understand that this error is a natural result of my clumsiness. And in any case it was quickly fixed (the problem was in an attempt to pass non string data into FileWrite via third function, if necessary - I can describe it in more details). But the error looks not very clear and a little frightening :) and the compiler does not hint anywhere that it is expected. Maybe we should at least add some sort of warping or something...

Can you attach source code to servicedesk?
 

Compile error 244: tree optimizationerror

#property library
int f1( int i )
{
    switch ( i ) {
    case  0: return ( 1 );
    default: if ( f2() == 1 ) return ( 3 );
    }
    return ( 0 );
}
int f2() { return ( f1( 0 )); }
build 930
 
So, does everyone's indicator timer start clearly from OnInit() when the terminal starts?
 
pronych:
So, does everyone starts the indicator timer clearly from OnInit() at terminal start?
bool  EventSetTimer(
   int  seconds      // количество секунд
   );

Even if the timer was not created at the first attempt, what prevents it from checking that the timer was created (it's a boolean function) and taking

several creation attempts with checks?

 
Can anyone tell me how to find out the compilation error number?
 
Fleder:
Can anyone tell me how to find out the compilation error number?
ResetLastError();
.
.
.
Print("Ошибка: ",GetLastError());
 
Fleder:

Even if the timer was not created at the first attempt, what prevents it from checking that the timer was created (it's a boolean function) and taking

several creation attempts with checks?

It's worth checking, but it's no use. Are you suggesting to do it in an infinite loop?
 

TheGetLastError function is for runtime errors.

Interested in compilation errors.

 
Fleder:
Can someone tell me how to find out compilation error number?

And if you need error description, you should look in MetaEditir's help:

Compilation errors

 
pronych:
It's worth checking, but it's no use. Are you suggesting doing it in an endless loop?
There is no point in doing it in an infinite loop. Make a limited number of attempts and thenreturnINIT_FAILED inint OnInit() function.
Reason: