Have you tried to put else ? It crashes most probably because there is no alternative commands to do if not connected.
deysmacro:
Have you tried to put else ? It crashes most probably because there is no alternative commands to do if not connected.
Have you tried to put else ? It crashes most probably because there is no alternative commands to do if not connected.
Thanks deysmacro:h but with this command connectnamedpipe stop the script and wait for a connection so I cant use an else because I need to wait for a connection. For this reason, my script are inside a while for run all function and restart again and wait again for a new connection...
Show us full code then. Someone will look into if they have spare time. Use SRC when posting codes.
bisewski:
Please post code that makes sense and use SRC button as suggested by deysmacro.
Hi.
I have a script that connect other program with pipe mode.
while(!IsStopped()) {
bool fConnected = ConnectNamedPipe(hPipe, NULL)!= 0;
if (fConnected) {
The lines above are responsable to wait for this connection.
My problem is that When I dont have any connect and I try to exit this script, it crasch the mt4.
How can I to wait for connections and exit without crash mt4?
Thanks and sorry my english

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi.
I have a script that connect other program with pipe mode.
while(!IsStopped()) {
bool fConnected = ConnectNamedPipe(hPipe, NULL)!= 0;
if (fConnected) {
The lines above are responsable to wait for this connection.
My problem is that When I dont have any connect and I try to exit this script, it crasch the mt4.
How can I to wait for connections and exit without crash mt4?
Thanks and sorry my english