Line numbers and better syntax error messages

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

User avatar
Rado1
Posts: 770
Joined: Wed May 05, 2010 12:16 pm

Line numbers and better syntax error messages

Postby Rado1 » Tue Jun 12, 2012 7:36 pm

Especially for long scripts, it would be helpful to have line numbers in code editor and enhancing syntax error messages by references to the line numbers where problems occurred.

Some of my scripts are about 400 lines and it is very difficult to find bugs there if error messages say only "invalid Primary" or "invalid Expr".

User avatar
VilleK
Site Admin
Posts: 1891
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Postby VilleK » Wed Jun 13, 2012 9:11 am

Yes, the error messages are a mess. I try to fix them in the compiler whenever I get one of those myself. At least there does not seem to be any crashes left, previously you could get "access violation" on certain syntax errors.

Line numbers are a good idea, should be easy to add a label that shows the current line and column.

User avatar
Rado1
Posts: 770
Joined: Wed May 05, 2010 12:16 pm

Postby Rado1 » Sun Apr 07, 2013 10:00 am

Hi Ville,

could you please add line/column also to the "Assignment destination must be variable or array" syntax error message? I wrote a longer script this morning and could not find the place where the problem was. After many commenting and uncommenting of code blocks, I finally found that instead of == I used = for comparison.

User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Postby jonaspm » Mon Apr 08, 2013 3:33 am

+1 :)

User avatar
rrTea
Posts: 306
Joined: Sat Feb 15, 2014 9:54 am

Postby rrTea » Sat Feb 28, 2015 7:33 am

One that always confuses me is the error that appears when a Condition component tries to process something like this:

Code: Select all

return ((A == 99) (B == 66));
//originally there was a "&&" (or "||") between the two conditions,
//but it got lost during editing...


it returns a scary sounding
Assertion failure (C:\Data\Delphi32\ZzDC_Public\tools\ZDesigner\Compiler\Zc.PAS, line 1835) (line: 4, col: 16) (what does it mean?)

User avatar
VilleK
Site Admin
Posts: 1891
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Postby VilleK » Mon Mar 02, 2015 8:44 am

Thanks, I've improved that error message for next update.


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest