I'm not sure about this, but atleast in C++ (From what I have read it...), while loop just needs the condition in the ()'s, so it would be like this: while ($i < 20) { ... $i++ } instead of while ($i++ <20) { ... } Though I didn't quite understand if it already works... but just thought I would share that
Then, another solution would propably be that you have to select the object, but I can't remember now the command (Don't have Maya or it's manual at me right now), but you could search for it yourself
Yeah, its just that you havent specified which object(s) you want to move, like you have been for duplication.
So to go along w the form of your loop construct, just pop a name into the move command ...
//start $i at 0 $i = 0;
//loop while $i is less than 20 while($i++ < 20){
//duplicate object(floor) duplicate pCube1;
//move it up move 0 $i 0 ("pCube" +$i);
}
...so it will tanslate the newly duplicated cube of the current loop. The brackets and quaotations are there so you can build up the string name from both string characters and the $i variable character.