you don't need all those eval statements:
for ($i = 0; $i <= 16; ++$i)
{
$object_a = ("schalB_" + $i);
$object_b = "locator1" ;
select -add $object_b;
//commando
connectAttr -f "locator1.schalB" ($object_a + ".rotateZ");
}
this will work better

A
Technical Director - Framestore
Currently working on: Your Highness
IMDB