Buzzer (Sketch 11) Error: too many arguments to function 'int function(char)'

Please Help Me...I'm getting an error on my code

too many arguments to function 'int function(char)'

//Buzzer

const int buzzerPin = 9; //Pulse Width Modulation, PWM

const int songLength = 18;
char notes[] = "cdfda ag cdfdg gf";
int beats[] = {1,1,1,1,1,1,4,4,2,1,1,1,1,1,1,4,4,2};
int tempo = 150;

void setup()
{
pinMode(9,OUTPUT);
}

void loop()
{
int i; //arbituary integer
int duration; //in milliseconds

for (i=0; i< songLength; i++) //counts up from 0 until it reaches song length

{
duration = beats_*tempo; //length of note and rests in notation_

_ if (notes == ' ') //this signifies a rest in the music_
* {*
* delay(duration); //*
* }*
* else*
* {*
_ tone(9, frequency(notes*, duration);
delay(duration);
}
delay(tempo/10);
}*_

while(true) {} //this prevents an Infinite Loop
}
int frequency(char note)
{
* int i;*
* const int numNotes = 8; //number of notes stored*

* char names[] = {'c','d','e','f','g','a','b','C'};*
* int frequencies[] = {262,294,330,349,392,440,494,523};*

* for(i=0; i<numNotes; i++) //step through the notes*
* {*
_ if (names == note)
* {
return(frequencies);
}
}
return(0); //this prevents an Infinite Loop*

}_

int frequency(char note)

You have a function that takes one argument.

frequency(notes, duration)

You are calling it with two. Since two is more than one, most days of the week, the compiler calls you on it.

You have, in that statement, an incorrect number of parentheses. Something is clearly in the wrong place.

I still don't get it, please be more specific about what I need to modify

I still don't get it, please be more specific about what I need to modify

Are you typing this code from a book? If so, look at where you are missing a close parentheses.

How many arguments does the tone() function take? Three. How many are you supplying? Two.

How many does the frequency() function take? One. How many are you supplying? Two.

This suggests that the closing parentheses is missing after the first argument to the frequency() function.

When you open brackets you have to close them too (for instance like this

See what I did there.

 tone(9, frequency(notes, duration);

Think brackets. Open brackets - Closed brackets = zero. Without this law, syntax becomes unstable and the universe, (as we know it) could cease to exist.