Why is this code to programmatically create a content type failing?
You have node_type_save and node_add_body_field in the wrong order. You can always steal ideas from http://api.drupal.org/api/drupal/profiles--standard--standard.install/function/standard_install/7