Dna Unwind

I am making a strand of dna unwind and attempting to use mel to do it. I have built my DNA with a base and rotated and duplicated it to its spiral shape. I now want to control the rotate y of each (20 individual pairs) with this script.

for ($i=1; $i<=019; $i++) {
float $rotY = $i * 0.05;
expression -s ("rotateY = pair020.RotateY * " + $rotY + ";") -o ("pair" + $i) -ae 1 -uc all;
};

when I run the script I get this error

// Error: Attribute not found or variable missing '$': pair020.RotateY //
// Error: Attribute not found or variable missing '$': rotateY //

Why does this happen as each pair I have has a different rotate Y value in the channel.
Thanks for your help!!!

re your objectsnamed pair001 paor002.. or pair01 pair02...

if thsi is your mnaming convention all the apply would be wrong. So the object name after -o must be right for this to work out.

So most likely ("pair" + $i) is just plain wrong. Anyway i would meake his all isnide one expression node.

QUOTE
Why does this happen as each pair I have has a different rotate Y value in the channel.
Thanks for your help!!!

Its a very special kind of syntax error, that happens when the expression is about to be parsed but does not make sense.