Wrong path when adding custom tab in BuddyPress [closed]

Try this:

function my_setup_nav() {
  global $bp;

  bp_core_new_nav_item( array( 
      'name' => __( 'My ads', 'buddypress' ),
      'parent_slug' => $bp->profile->slug,
      'slug' => 'myads', 
      'position' => 30,
      'screen_function' => 'my_item_one_template',
      'default_subnav_slug' => 'myads' 
  ) );

}

add_action( 'bp_setup_nav', 'my_setup_nav' );

function my_item_one_template() {
    add_action( 'bp_template_content', 'my_item_create_screen' );
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}

function my_item_create_screen() { 
    locate_template( array( 'buddypress/members/single/myads.php' ), true );
}

Put myads.php in your theme or child theme in this folder structure:
[theme]/buddypress/members/single/myads.php

If it still doesn’t find the template, you have to register the template so the BP can find it in the template stack. That can be rather complex. An easier method is to put the code directly in the function:

function my_item_create_screen() { 
?>
   <h2>MY ADS</h2>  
<?php 
}