Which version, 9.2, 9.3 and 10.x all have different syntax to access the shape field properties.
I recommend you instead of accessing the centroid this way, take an easier path: use the out of the box Feature To Point tool followed by the Add XY Coordinates tool.