This message appears if you pass uninitialized or empty string as name
Slawa, I tried this.
Array[0]=""; . . //The Array[0] may or may not get written; . if(Array[0]!="" && ObjectFind(Array[0])!=-1) // gives error 4204 "object name passed to ObjectFind function is missing in the objects list"
Don't use empty string as name and You don't get error 4024
BTW "calculation of a logical expression is always completed, never early terminated." (quote from "MQL4: Syntax") ie empty string passed to ObjectFind
BTW "calculation of a logical expression is always completed, never early terminated." (quote from "MQL4: Syntax") ie empty string passed to ObjectFind
Don't use empty string as name and You don't get error 4024
BTW "calculation of a logical expression is always completed, never early terminated." (quote from "MQL4: Syntax") ie empty string passed to ObjectFind
BTW "calculation of a logical expression is always completed, never early terminated." (quote from "MQL4: Syntax") ie empty string passed to ObjectFind
That is nice Slawa,
But how do I determine if the string is empty or not if I cannot use logical expression?
if(Array[0]!="") { if(ObjectFind(Array[0])!=-1) blah-blah-blah }
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
However, if the Object name does not exist I get log error message: "object name passed to ObjectFind function is missing in the objects list". Why am I getting this redundant message "if" the very purpose of the function is to determine "if" the name exist and "if" not, return -1 only.
Is there any other way to check if the Object Name exists without getting this error message?