Master list of compiler errors?

 

Hi All

Attempting to master or at least get proficienti at MQL4 ...not easy! Is there a master list of compiler error messages which explains their meaning?

Also is there an overall index for the site/documentaion/Olegs book. I'm finding it really frustrating to find specific items, particularly since I usually don't know what I am lookin for.

Particular problem now is this error message:'A' - expression on global scope not allowed C:\Program Files\MIG Trading Station\experts\INSIDEBAR2.mq4 (132, 10)
Also as a matter of curiosity do the numbers in bracket at the end of the line refer to something useful, such as line number,letter position.

thanks in advance for suggestions

Keith

 
  1. When you find it please post on forum...

maybe in install directory - since u got error text ;), could do text search in install tree and maybe hit paydirt, yes?

ie, some readable file having the errors. BUT! u not gonna find any explanatory text. Maybe u email MetaQuotes support...

tbh - text errors kinda do their stuff, think it depends IF you got any computing background whereby you done many countless battles with zillions of language processors... :)

yes? after while, get a feel for wat's up doc? ok...

If not mind may I draw your attention to two "time to tear remaining hair out" errors - lol

  1. Unbalanced RIGHT Parentheses, IF unbalanced () pairs and in this instance the ( you get this message
  2. '\ end of program' - unbalanced LEFT Parentheses, IF unbalanced () pairs and in this instance the ) you get this message

I mention above cuz these tell me to go to gun cabinet time has arrived....

U need to find the proverbial needle in haystack and is best you have some help like programmers editor which highlights (), {} pairs.

is nightmare IF done loads editing across many files and unfortunately...lol, not hit that F5 key now 'n then - good habit is that, kinda like incremental working... just do few lines coding and pow... hit the F5 key, compiler is FAST so not big issue but will [probably ;] stop hideous unbalanced paren message!

====

use Search: box top right all pages. Pays to be creative...

New Search Engine for MQL4.community

----

documentation 'hits' seen on left column of first page search results - broken down by hits per category, eg: Book,Documentation,Articles,...

site is MASSIVE resource - like said above, gotta get creative.

if totally fedup use say google to search this forum: "compiler site:forum.mql4.com"

above search (without the double quotes "") returned 68 hits

wanna search within these hits? hit End key -> click Search within results link -> enter in text ... and google restricts search to those first level 68 hits...

be carefull of plurals why? cause restrict search. eg, using "error" returned 34 hits; using "errors" returned 19 hits.

same comments about UPPER/lower case

hey! wat I go on about - you may be search guru...;)

----

Programming in Algorithmic Language MQL4

=====

(132,10)

line 132, column 10

Compiler has got to this point and decided not understand wat wat, ok?

the column # not always mean much as can get cascade effect of not understood syntax so by col.10 is just waaaay too much for it so throws error

Line # may also be not much help either due to above comments.

====

yes, global scope expr not allowed - not syntactically correct - please read editor help/context sensitive help text. F1 when cursor over language syntax or ctrl-t > Help tab or ctrl-d > Navigator's search tab ........ when in help tab of editor, click the Sync btn > Navigator will popup if not there and drill down to highlighted place that help text shows - great way to start getting feel for where stuff is hidden - lol

=======

Keith - U know wat saying about curiosity... so be careful with precious as Gollum would drone on about ;o))

 
ukt:
  1. When you find it please post on forum...

maybe in install directory - since u got error text ;), could do text search in install tree and maybe hit paydirt, yes?

ie, some readable file having the errors. BUT! u not gonna find any explanatory text. Maybe u email MetaQuotes support...

tbh - text errors kinda do their stuff, think it depends IF you got any computing background whereby you done many countless battles with zillions of language processors... :)

yes? after while, get a feel for wat's up doc? ok...

If not mind may I draw your attention to two "time to tear remaining hair out" errors - lol

  1. Unbalanced RIGHT Parentheses, IF unbalanced () pairs and in this instance the ( you get this message
  2. '\ end of program' - unbalanced LEFT Parentheses, IF unbalanced () pairs and in this instance the ) you get this message

I mention above cuz these tell me to go to gun cabinet time has arrived....

U need to find the proverbial needle in haystack and is best you have some help like programmers editor which highlights (), {} pairs.

is nightmare IF done loads editing across many files and unfortunately...lol, not hit that F5 key now 'n then - good habit is that, kinda like incremental working... just do few lines coding and pow... hit the F5 key, compiler is FAST so not big issue but will [probably ;] stop hideous unbalanced paren message!

====

use Search: box top right all pages. Pays to be creative...

New Search Engine for MQL4.community

----

documentation 'hits' seen on left column of first page search results - broken down by hits per category, eg: Book,Documentation,Articles,...

site is MASSIVE resource - like said above, gotta get creative.

if totally fedup use say google to search this forum: "compiler site:forum.mql4.com"

above search (without the double quotes "") returned 68 hits

wanna search within these hits? hit End key -> click Search within results link -> enter in text ... and google restricts search to those first level 68 hits...

be carefull of plurals why? cause restrict search. eg, using "error" returned 34 hits; using "errors" returned 19 hits.

same comments about UPPER/lower case

hey! wat I go on about - you may be search guru...;)

----

Programming in Algorithmic Language MQL4

=====

(132,10)

line 132, column 10

Compiler has got to this point and decided not understand wat wat, ok?

the column # not always mean much as can get cascade effect of not understood syntax so by col.10 is just waaaay too much for it so throws error

Line # may also be not much help either due to above comments.

====

yes, global scope expr not allowed - not syntactically correct - please read editor help/context sensitive help text. F1 when cursor over language syntax or ctrl-t > Help tab or ctrl-d > Navigator's search tab ........ when in help tab of editor, click the Sync btn > Navigator will popup if not there and drill down to highlighted place that help text shows - great way to start getting feel for where stuff is hidden - lol

=======

Keith - U know wat saying about curiosity... so be careful with precious as Gollum would drone on about ;o))

Hi ukt:

Many thanks for the insights ...gives me some avenues to pursue. You were psychic about the unbalanced errors. The problem I posted unfolded when I tried to

find an unbalanced error, I matched all pairs physically and still, got error, so I was pasting block by block into blank EA waiting for error and then going deeper and

pasting line by line then I got the global error, which did not come up in the original compilation.

So now I'm wondering if the compiler is just buggy or am I losing it.

Since there are working EA's and indicators and scripts out there I must conclude that the truth is out there and I will find it.

As to Gollum; indeed, I think that most habitues of these sites must beware of Gollums' peril, the charts always point to the availability of riches

but rarely indicate the difficulties in acquiring them!!

Thanks again

cheers

Keith

 

Keith

"So now I'm wondering if the compiler is just buggy or am I losing it."

no not you, just way parsing happens with it. often when correct such an error - is proverbial opening can of worms. If think about it, any unbalanced token throws analysis haywire since where to make new start if never reach end... :- )

"the charts always point to the availability of riches"

oh yessss, is this not why we all here?

after while if still have deposit - one sees that those difficulties are indeed real, not phantoms at all.

a most decent editor and so much more and.... freeware which has projects, detects when one of it's file tabs has had file updated on disc,... and vip is the matching up of {}, ()

can have it via hot key combo, highlight all gunk btwn etc. is real boon for times such as you experience now.

metaeditor may have some interesting features but way to niche and can not be really seen as programmers editor - way to ltd it is.

oh yes... forgot to mention - one of those editor features: when get compile errors, you can use F8 to get cursor put on line of file where error is, repeated F8's sequentially go through each error line in errors tab. shift-F8 goes backwards...

is handy. also must physically "mouse click" source line else focus not mapped to it - even though cursor may be flashing on the line... is one of those aforementioned niche features!

am sure you will crack the errors stuff in short order (err - make mine a burger 'n fries ;-)

best to you

.

btw - if wanna consider cuz total brain rot has set in, attach file and the collective 'we' will surely lend hand to make into compilable thingy... ok?

we all in same boat really - gotta strive to help best can (well... most times ;)

 

Hi kminler,

here is a link where you can see the error codes: https://docs.mql4.com/constants/errors

good luck,

 
forexfordinner:

Hi kminler,

here is a link where you can see the error codes: https://docs.mql4.com/constants/errors

good luck,

Hi Forexfordinner

Thanks for the link, I was actually looking for compiler errors, but sooner or later I would have been looking for these so you've saved me some time

and the necessity of asking another dumb question!

Thanks again

Keith

 

Hi ukt

I took your advice and downloaded PSPad, and used it to find my missing parentheses, was in a nested group. I either need to get a bigger monitor or better glasses.(Likely both!!)

So now my EA has compiled and all I need to do is get it to ececute.

So Next question, after changing the code and re-compiling is the EA which ia already attached to a chart also updated? I assume not and that It would need to be removed from the chart and attached again.

The reason I ask is that I get an alert error, not enough bars, so I moved way out so I have lots of bars..still get error. so I reversed the < sign (who knows?)

Still get error. So I deleted the block giving me the alert error by making the entire block into a comment //...//. So still get error.

In all of these cases I have removed the EA and re-atttached it. I also remembered to re-compile. Tried one more time.

Finally got rid of old version, waiting for results from real time demo.

Meanwhile I can't delete the original version from EA tester, so since it runs on an hourly chart or better I have no idea whether or not it works.

So any thoughts on deleting the original from the tester? Do I need extreme measures like shuttingdown the application?

Thanks

Keith

Ps. I'll take a raincheck on the offer to help... there is no doubt that I'll need the help.

 

Hi ukt

Never mind... found my problem... too many copies open.. modifying the wrong one... maybe I should get some sleep!!

Keith

 
kminler:

Hi ukt

Never mind... found my problem... too many copies open.. modifying the wrong one... maybe I should get some sleep!!

Keith

ohhhh boy - i experience this often, filenames can become as one after awhile and YES u must sleep - happy bunnies need shut eye periods, yes?

anytime - i keep umbrella on hot-standby

;o)


yep, u most likely see that recompile kicks terminal into reload...

i understand shotguns are most good tool to delete things - ummm, errr - like files...

Reason: