Random character emitter...won't change

I have been trying to do this: http://www.highend3d.com/maya/tutorials/harley1/
tutorial. I have everything done up the point where the ‘a’ emits from the nurb plane, when I try to enter the index=rand(1,26); it just tells me that index is not correct. Also I get about 10 errors for the next piece of code. Is there something wrong with the code or am I doing somethin wrong or what?

Thanks

Cap

i don’t see any index in there if u are writing an expression what u need to do is to have rand function to be assigned to a variable like so $index = rand(1,2);
that way u will not get any errors in future
what that does it grabs the value from 1 to 2 randomly and assigns to a place holder $index that u initialize or declare as variable for your information to be stored

and i looked through his code i don’t see anything wrong with it and that code is properly coded so not sure what errors u get u said like 10 of them

Souldnt it be particleobjectname.index otherwise may could get confused… Whats the error message exactly?

LOL sorry didn’t notice there is index located on that page yeah it supposed to be particleShape1.index = rand(.26);
course index is the attribute array u added

Yea the index thing is there. As for the error messages they are as follows: (and sorry about the late reply, ive been away for a while).

// Error: particleShape1.index=rand(1,26);
//
// Error: Invalid use of Maya object “particleShape1.index”. //
// Error: vector $temp=particleShape1.worldVelocity;
//
// Error: Invalid use of Maya object “particleShape1.worldVelocity”. //
// Error: { particleShape1.gate=1;};
//
// Error: Invalid use of Maya object “particleShape1.gate”. //
// Error: {particleShape1.gate=0;};
//
// Error: Invalid use of Maya object “particleShape1.gate”. //
// Error: if (particleShape1.gate==1){ particleShape1.acceleration=<<0,rand(20,25),0>>;
//
// Error: Invalid use of Maya object “particleShape1.gate”. //
// Error: if (particleShape1.gate==0) {
//
// Error: Invalid use of Maya object “particleShape1.gate”. //

Thanks to any who can help

i can only think if u changed particleShape1 to something else that may privent u from properly executing this chunk of code to check that not sure how well u know maya but in Outliner select Particle and ctrl A to bring up Attribute editor and there is the name first row see what’s in there course sounds to me it has nothing to do with any variables or index issue but ParticleShape1 itself i can only think is to delete ParticleShape1 and recreate it