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.
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.