Here's the code, minus parts that are irrelevant to make it easier to read, and with comments that tell you the way I thought it worked.
Code:
for(n = 0 ; n < 100 ; n++)
{
RefreshNow();
// Removed some variable stuff, not making or modifying any items
AddNull(newNullName); // Creates new null, presumably selecting it
ParentItem("Center"); // Parents to null I created before loop starts
LoadObject(pixelObj); // Adds object, and presumably selecting it
Rotation(180,0,0); // Modifies the loaded object, but only works on the first loop.
ParentItem(newNullName); // Parents to the null I just made
SelectItem(newNullName); // Selects the null I made before adding the object
for(m = 0 ; m <= 72 ; m++)
{
GoToFrame(m);
// Removed some other math that just creates the values used below.
Position(xP,yP,zP); // Moves the position of the new null on a particular frame
}
}
When it loops back, I don't see how it could be ignoring the Rotation() command, or having the wrong item selected.