PDA

View Full Version : MEL TUT cant do it LOL help needed



Dean
04-27-2010, 07:13 PM
Ok guys im watching the insect rigging tut, and im stuck at the first mel script.
Heres mine its exaclty the same as in the tut

global proc matchTrns () {

string $mtr [] = `ls -sl` ;

if (size($mtr) < 2) {
warning "MUST SELECT 2 OBJECT!";



}


} else if (size($mtr)==2) {


parent;

setAttr ($mtr[0] + ".tx") 0;
setAttr ($mtr[0] + ".ty") 0;
setAttr ($mtr[0] + ".tz") 0;
setAttr ($mtr[0] + ".rx") 0;
setAttr ($mtr[0] + ".ty") 0;
setAttr ($mtr[0] + ".tz") 0;

select $mtr [0];

parent -w;


}

and im geting a syntax error, it says : Error: "$mtr" is an undeclared variable. //
// Error: select $mtr [0];

if someone could help me out id apreciate it.

Dean
04-27-2010, 07:42 PM
thanks to fusedgore i no longer have this problem !

Fusedgore
04-27-2010, 07:44 PM
Looks like you forgot to add the


matchTrns;

at the end.

Dean
04-27-2010, 07:48 PM
yeah i did :bow