Hey Dan, I found another method, thought it might be worth sharing:
x=Math.round(thisComp.layer(“pieza 2/engranes SMALL”).transform.zRotation);
“x=” +x
This is an expression I’m using at a different layer, in which I’m using Math.round, but the structure is the same, I just created a variable, apparently it worked.