View Full Version : Unterminated String

06 June 2007, 09:58 PM
Hi there. Hope someone out there can shed some light on a mel error I can't seem to solve.

From what Ive read of the Unterminated string error, it comes when you fail to add a semicolon, end quotes or split a concatenated string over multiple lines.
As far as I can tell Im doing none of these.

Im writing a global proc that includes this variable.

string $currHPCSml = $currObj + "_" + $handPC + "." + "W0";

When $currHPCSml is used later in the same procedure the procedure returns the error Unterminated string.

What I don't understand is that the procedure seems to have no complaints about this string

string $currOPC = $currObj + "_" + $handPC + "." + $posName + "W" + $PCWNumber;

Which I see as being largely the same.
All my variables are declared and this is the only error I recieve.

Thanks in advance.

06 June 2007, 12:15 PM
I would need to look at more of the code to be sure, but I would recommend two things.

First, anytime you are catenating strings, wrap them in parentheses, just to be safe.

string $currHPCSml = ($currObj + "_" + $handPC + "." + "W0");

Second, look around the area of the error. Look on the lines above for a possible error. Your error might be on one of the lines above, and it throws the error on the line in question, because that is where it hit the semi colon.

CGTalk Moderation
06 June 2007, 12:15 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.