I'm trying to create a script that will take a random selection of objects, and organize them into 3 "piles" it should be fairly simple, and I'm sure I'm just about there... but when I try to execute it I get an error message, it reads:
"//Error: No object matches name: "
Anyone have an idea what's wrong? This is only my second mel script.
string $objs[] = (`ls -sl`);
int $numObjs = size( $objs );
float $oneThird = $numObjs / 3;
float $twoThirds = $numObjs - $oneThird;
for( $i = 0; $i < $numObjs; $i++ );{
string $n = $objs[$i];
if ( $i < $oneThird ){
move -ws 0 5 0 $n;
}else{
if ( $i < $twoThirds ){
move -ws 0 10 0 $n;
}else{
move -ws 0 15 0 $n;
}
}
}
Replies