cbamber85
03-24-2009, 10:38 AM
Hi all,
I'm currently in the process of converting a prototype, of a program I wrote in Python, into a C++ plugin. But I've come across a weird problem, parts of my program feed data back into a scrollField in an output window I created, but the newline character seems to be causing an 'Unterminated string' error. This is the offending command:
MGlobal::executeCommand("scrollField -e -ip 0 -it (\"\n\
-------------------------------------\n\
Simulation started.\") openEchoScroll;"));
And this is the error from the script editor:
// Error: scrollField -e -ip 0 -it (" //
// Error: Line 1.28: Unterminated string. //
But this is crazy because I get no compiling errors, and when I copy the code into the script editor manually (and remove the escape characters from the apostrophes), it works perfectly!
Any suggestions?
I'm currently in the process of converting a prototype, of a program I wrote in Python, into a C++ plugin. But I've come across a weird problem, parts of my program feed data back into a scrollField in an output window I created, but the newline character seems to be causing an 'Unterminated string' error. This is the offending command:
MGlobal::executeCommand("scrollField -e -ip 0 -it (\"\n\
-------------------------------------\n\
Simulation started.\") openEchoScroll;"));
And this is the error from the script editor:
// Error: scrollField -e -ip 0 -it (" //
// Error: Line 1.28: Unterminated string. //
But this is crazy because I get no compiling errors, and when I copy the code into the script editor manually (and remove the escape characters from the apostrophes), it works perfectly!
Any suggestions?
