PDA

View Full Version : A problem with a Mel script



bubkis
08-06-2009, 12:21 PM
I'm doing now the Mel scripting tutorial
(i got the DVD)

but i have a problem in lesson 11 with a Mel script

here is the script:

int $myCounter;
$myCounter = $myCounter + 1;



// Set the file name as temp
file -rename ("temp" + $myCounter + ".ma")

// save it as maya Ascii
file -save -type "maya Ascii";
print ("\n");
print ("just saved"+ ("temp" + $myCounter + ".ma"));

and when i execute it i get this error:

// Error: Flags must come before objects: -save

please help me

P.S

I'm using Maya 2009

bubkis
08-06-2009, 01:00 PM
so how do i fix it?

sunder
08-06-2009, 02:15 PM
Hi bubkis. Your code is good - you're just missing a semicolon at this statement
file -rename ("temp" + $myCounter + ".ma")
Let us know if that works for you