Ivalue required as left operand of assignment error

Sorry didn't realized that it didn't post correctly. My question was would it be possible to replace the servos with motors and do it by attaching the motors to the same pins as the servos or do I need to write some code again?