Hello,
I was playing around in maya this morning just tooling with some python built-in functions and I am getting an error using the abs() function. I am trying to get the absolute of a user entered number.
here is my error:
# Error: TypeError: abs() takes no arguments (1 given) #
here is my code:
def abs():
getInter = cmds.textField("absTest", query=True, text=True)
getInt = int(getInter)
absInt = abs(getInt)
cmds.textField("absAnswer", edit=True, text=absInt)
I have no idea why I am getting this error. the argument I am passing is a integer.