Reseting a 6dof

I need to change a 6dof joint’s Y-Axis constrain with a keypress

I hacked in what I need to a old script…

what did I do wrong?

################# 6DOF Rotational Motor Constraint

import PhysicConstraints Module

import PhysicsConstraints

get current scene

scene = GameLogic.getCurrentScene()

get object list

objList = scene.objects

get object named OBCube_Green

obj1 = cont.owner

get object named OBCube_Red

obj2 = objList[“Center”]

want to use a 6DOF constraint

constraintType = 12

get obj1 physics ID

obj1_ID = obj1.getPhysicsId()

get obj2 physics ID

obj2_ID = obj2.getPhysicsId()

Use center of obj1 for pivot point

pivotPos_X = 0.0
pivotPos_Y = 0.0
pivotPos_Z = 0.0

Make pivot axis orientation same as obj1 axis

pivotAxis_X = 0.0
pivotAxis_Y = 0.0
pivotAxis_Z = 0.0

disable collisions between obj1 & obj2

flag = 128

create a 6DOF constraint

cube_6DOF = PhysicsConstraints.createConstraint( obj1_ID, obj2_ID,
constraintType,
pivotPos_X, pivotPos_Y, pivotPos_Z,
pivotAxis_X, pivotAxis_Y, pivotAxis_Z,
flag)

set rotation around pivot x and y axis to zero

cube_6DOF.setParam(3, 0.0, 0.0)
cube_6DOF.setParam(4, -0.21816615649929, .43633231299858)

I think it’s a label/name issue
I Bolded the code that gives the error