Apologies for the newbie question. I've worked as a programmer for years but am
just now learning MQL4. I'm having trouble using MessageBox and PlaySound. My EA
looks like this:
int start() {
Print("Error number ",GetLastError());
MessageBox("Testing");
Print("Error number ",GetLastError());
PlaySound("alert2.wav");
Print("Error number ",GetLastError());
return(0);
}
The journal shows this:
Error number 4059
Error number 4059
Error number 0
Error 4059 is ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE. I can't imagine that MessageBox
and PlaySound would be disabled for testing...would they? I've heard of problems
with MessageBox on Windows 2003, but I'm using XP, and it looks like that problem
was fixed anyway.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
int start() {
Print("Error number ",GetLastError());
MessageBox("Testing");
Print("Error number ",GetLastError());
PlaySound("alert2.wav");
Print("Error number ",GetLastError());
return(0);
}
The journal shows this:
Error number 4059
Error number 4059
Error number 0
Error 4059 is ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE. I can't imagine that MessageBox and PlaySound would be disabled for testing...would they? I've heard of problems with MessageBox on Windows 2003, but I'm using XP, and it looks like that problem was fixed anyway.
Thanks :-)
Mango