drupal 7 programatically close comments in custom node type I have created a content type programmatically. Also looked at http://drupal.org/node/1169864 but comments are not being close. Although I solve it by variable_set('comment_mynodetype', '1'). Any other help.
My code is below:

$t = get_t();

  $node = array(
    'type' => NODE_NAME,
    'name' => $t('My Node Type'),
    'base' => 'node_content',
    'locked' => TRUE,
    'node-preview' => 0,
    'node-options' => array('status'),
    'comment' => array('status' => 1),
    'description' => $t('A content type.'),
    'title_label' => $t('Title'),
    'custom' => FALSE
  );
  $content_type = node_type_set_defaults($node);
  //add body field using drupal function
  node_add_body_field($content_type, $t('Description'));
  node_type_save($content_type);


Any help ..

[UPDATED]

 $node = array(
        'type' =&gt; NODE_NAME,
        'name' =&gt; $t('My Node Type'),
        'base' =&gt; 'node_content',
        'locked' =&gt; TRUE,
        'node-preview' =&gt; 0,
        'node-options' =&gt; array('status'),
        'description' =&gt; $t('A content type.'),
        'title_label' =&gt; $t('Title'),
        'custom' =&gt; FALSE
      );
   //close comments
   variable_set('comment_mediasite', '1');
$node-&gt;comment should be an integer (not an array). Acceptable values are:


COMMENT_NODE_CLOSED
COMMENT_NODE_HIDDEN
COMMENT_NODE_OPEN