Errors, bugs, questions - page 2953

 

Another issue with the code:

switch(EnumTypeSound) 
{
   default: return;
   case tSoundError:   PlaySound("stops.wav");  break;
   case tSoundAlert:   PlaySound("alert.wav");  break;
   case tSoundAlert2:  PlaySound("alert2.wav"); break;
   case tSoundExpert:  PlaySound("expert.wav"); break;
   case tSoundNews:    PlaySound("news.wav");   break;
   case tSoundOk:      PlaySound("ok.wav");     break;
   case tSoundTick:    PlaySound("tick.wav");   break;
   case tSoundTimeout: PlaySound("timeout.wav"); break;
}

In fact, when trying to access

PlaySound("stops.wav");

The following error occurs: [Err: 5019] File does not exist

The code itself is located in the depths of the project, which consists of dozens of mqh files and this function is not called directly from mq5 (just to make sure).

The help says,"The file must be located in the terminal_directory\Sounds or its subdirectory. "However, if you open the data directory(File - Open Data Folder), this folder is not there. But it is in the installed folder"C:\Program Files\MetaTrader 5". Maybe, it affects somehow the file request at call?

The stops.wav file itselfis present in folder"C:\Program Files\MetaTrader 5\Sounds\".

I would like to solve this ridiculous error))) Thanks in advance!

 
Vadim Lin:

Another issue with the code:

In fact, when trying to access

The following error occurs: [Err: 5019] File does not exist

The code itself is located in the depths of the project, which consists of dozens of mqh files and this function is not called directly from mq5 (just to make sure).

The help says,"The file must be located in the terminal_directory\Sounds or its subdirectory. "However, if you open the data directory(File - Open Data Folder), this folder is not there. But it is in the installed folder"C:\Program Files\MetaTrader 5". Maybe, it affects somehow the file request at call?

The stops.wav file itselfis present in folder"C:\Program Files\MetaTrader 5\Sounds\".

I would like to solve this ridiculous error))) Thanks in advance!

This is how it works.

//+------------------------------------------------------------------+
//|                                                EnumTypeSound.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property script_show_inputs
//+------------------------------------------------------------------+
//| EnumTypeSound                                                    |
//+------------------------------------------------------------------+
enum EnumTypeSound
  {
   tSoundError,   // Stops
   tSoundAlert,   // Alert
   tSoundAlert2,  // Alert2
   tSoundExpert,  // Expert
   tSoundNews,    // News
   tSoundOk,      // Ok
   tSoundTick,    // Tick
   tSoundTimeout, // Timeout
  };
input EnumTypeSound TypeSound=tSoundError;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   switch(TypeSound)
     {
      default:
         return;
      case tSoundError:
         PlaySound("stops.wav");
         break;
      case tSoundAlert:
         PlaySound("alert.wav");
         break;
      case tSoundAlert2:
         PlaySound("alert2.wav");
         break;
      case tSoundExpert:
         PlaySound("expert.wav");
         break;
      case tSoundNews:
         PlaySound("news.wav");
         break;
      case tSoundOk:
         PlaySound("ok.wav");
         break;
      case tSoundTick:
         PlaySound("tick.wav");
         break;
      case tSoundTimeout:
         PlaySound("timeout.wav");
         break;
     }
  }
//+------------------------------------------------------------------+
 

Just now I found out that in the logs the key makes a quick jump to the line starting with the character corresponding to the key.


For example, if you disable the Time and Source columns, you can quickly go to the special character of your EA in the logs.

 
fxsaber:

Just now I found out that in the logs the key makes a quick jump to the line starting with the character corresponding to the key.


For example, if you disable the Time and Source columns, you can quickly go by the special character of your EA in the logs.

Likewise, didn't know! Thank you!

 
SanAlex:

That's how it works.

Yeah man( Checked it out, it's working for me now too... But in some places it gives an error for some reason (in some terminals), maybe the Sound folder isn't there, will dig around in general. Thanks for the reply! Just thought THEN there might be some restriction in the project structure subfiles that I didn't know about and didn't take into account...

 

it's strange how it works. build 2755.

zeros and variables to which I assign values from the array. and when I multiply the array values themselves by something, they change correctly in the debugger.


 
Aleksey Mavrin:

it's strange how it works. build 2755.

zeros and variables that I assign values from the array. but when I multiply the array values themselves by something they change correctly in the debugger.


Please update to beta 2775, please.

This has been fixed.

 

Most messengers show whether or not the message sent has been received/read.

Will there be such functionality in PMs?


ZZY Renate details of problems you write in the PM, as in nothing.

 
fxsaber:

Most messengers show whether or not the message sent has been received/read.

Will there be such functionality in PMs?


SZY Renate details of problems you write to PMs as if they were nothing.

Necessary, especially in freelance chat!

 
fxsaber:

Most messengers show whether or not the message sent has been received/read.

Will there be such functionality in PMs?


SZY Renate, the details of the problems you write in the PM, as in nothing.


The mobile version of the terminal has it.
Of course it does not compare with the users on the computer. But still...
Reason: