Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu Dec 28, 2006 5:11 am   

Syntax checker
 
Maybe I'm missing something, but how can you determine the exact location of a syntax error? In zMUD, you had the box at the bottom with the arrow pointing out where the error is. In CMUD, you have the "syntax error at row 0 col 1148" which doesn't tell me a whole lot as to where my error is.

Anyone have any suggestions? I've recently imported scripts over to CMUD, and some of the commands were not compatible, so I have to rework it. But to rewrite the entire script is not a pleasant idea, but I'm having difficulty identifying where the error is. Thanks!

Charneus
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 28, 2006 11:52 am   
 
If it's Row 0 Col 1148 then you probably need to format the script so that things are on different lines, then you'll see which row (line) it's really on. Or you can just go to the 1148th character on the first line.
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu Dec 28, 2006 6:02 pm   
 
Well, putting it on different lines didn't help, but I didn't realize we could do that on different lines.

It would then tell me Syntax error at row 16 col 94... so I would go through and count 94 characters, and it would be in the middle of a word.

What I wound up having to do to fix it was copy the entire thing, paste it into notepad, then reinsert each line separately and checking the syntax each line. Eventually I found out what the problem was. :\ There needs to be an easier way of doing this...

Charneus
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 28, 2006 7:14 pm   
 
Remember that the compatibility report will most likely get improved based on feedback. If you still have the example of what the error was and why the compatibility report wasn't helpful in that case then please post it so that Zugg can use the example to help improve things if possible.
From what I gather then the compatibility report pretty much just runs a script against a set of regex rules, rather than actually attempting to understand what's being done.
Also, it did let you know quickly that there was a problem with a script - in zMUD then you'd have no idea that the script wasn't working without clicking through each trigger/alias/whatever and seeing where the errors were - at least you were pointed to the right place in CMUD.
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sun Dec 31, 2006 1:41 pm   
 
Zugg does plan to add the row/col display to the editor eventually. I pointed this same thing out to him, that we get error messages with coordinates we can't see displayed. When you count characters, however, make sure you include all the whitespace.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jan 17, 2007 10:23 pm   
 
Also, you can just click on the alias/trigger/whatever to open it in the settings editor, then press Control-K (or select Syntax Check from the menu) and it should put your cursor at the location of the error.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net