Finding some help with a project using two HC-SR04 ultrasonic sensors and buzzer

Hi, I´m new here at this forum and new learning arduino. I started a project for my school, I´m trying to make that a buzzer launch a sound at a proper distance given by one of the ultrasonic sensors, the problem, is that my code doesnt compile, I tried puting a LED instead of the buzzer and works great, but a i wonder why isnt working with the buzzer. I apreciate any help and comments. Pd: I tried to explain myself in the cleares way, and I give you an apologize if english grammar and writing ist the best. English isnt my native language and I´m in the process of learning it.

This is my code

#include <NewPing.h>

#define NUM_SENSOR 2
#define MAX_DISTANCE 200
#define LED_0 8
#define LED_1 3

NewPing sonar[NUM_SENSOR] = {
NewPing(4, 4, MAX_DISTANCE),
NewPing(6, 6, MAX_DISTANCE)
};
int buzzer_pin=9;

void setup() {
Serial.begin(115200);
pinMode(LED_0, OUTPUT);
pinMode(LED_1, OUTPUT);
pinMode(buzzer_pin, OUTPUT);

turn_down();
}

void loop() {
float distancias[NUM_SENSOR];
float tiempos[NUM_SENSOR];
int i;
apagar();
for (i = 0; i < NUM_SENSOR; i++) {
delay(100);
tiempos_=sonar*.ping();_
distancias=(tiempos_0.0343)/2;
if(distancias==0){

* }else{
Serial.print(“Sensor “);
Serial.print(i);
Serial.print(”=”);
Serial.print(distancias);
Serial.print(“cm |”);
}
if((distancias[0]<30 && distancias[0]>0)|| (distancias[1]<30 && distancias[1]>0)){
if(distancias[0]<distancias[1]){_

digitalWrite(LED_0, HIGH);
tone(buzzer_pin,261);
_ }else{_
digitalWrite(LED_1, HIGH);
tone(buzzer_pin,987);
_ }
}
}
Serial.println();
}_

void turn_down(){
digitalWrite(LED_0, LOW);
digitalWrite(LED_1, LOW);
analogWrite(buzzer_pin, 0);
_}*_

Unfortunately the forum software messed up your code. Read the how to use this forum-please read sticky to see how to post code in code tags so that it doesn't turn into italics and remove array indexers.

If there are compile errors, post the entire error message text in code tags.

Use auto format (CTRL-t or Tools, Auto Format) to indent your code to make it easier to follow.

    tiempos[i]=sonar.ping();

You never use this array again, so it really isn't necessary to have an array of times.

    tone(buzzer_pin,261);

This starts making noise. There is no time defined, so the noise never ends. Probably not what you intended.