Understand MEL line number errors

Understand MEL line number errors

wreliford
Advocate Advocate
6,805 Views
1 Reply
Message 1 of 2

Understand MEL line number errors

wreliford
Advocate
Advocate

I understand when the Script Editor shows us the line number errors but what does the second part after the "dot" mean? For example:

 

// Error: Line 3.1: Syntax error //

 

The three means the line number.

 

But what does the ".1" part in this message mean? 

Thanks

William

 

 

0 Likes
Accepted solutions (1)
6,806 Views
1 Reply
Reply (1)
Message 2 of 2

RFlannery1
Collaborator
Collaborator
Accepted solution

The part after the dot is the character on the line where the error starts.  For example:

ls -sl 'hi';
// Error: ls -sl 'hi'; //
// Error: Line 1.8: Syntax error //

 The above error says that it starts on the 8th character of the line.  This would be the first single quote.  MEL expects double (normal) quotation marks, so that is why the error happened.

 

Keep in mind that the number after the dot is not always accurate.  Syntax evaluation is a tricky thing, and it can be hard to locate the exact spot of the error.  This affects many programs, not just Maya.  So if you can't find the error exactly where the number says, it could still be somewhere else in the line.