motoOnThenOff was not delclared in this scope

hi guys i`m doing the Spin Motor circ-03 and this message appears motoOnThenOff was not delclared in this scope what do i have to do to solve it?

here is my sketch

int motorPin= 9;

void setup()
{
// put your setup code here, to run once:
pinMode(motorPin, OUTPUT);
}

void loop()
{
motorOnThenOff();
//motorOnThenOffWithSpeed();
//motorAcceleration();
}
void motoronThenOff(){
int onTime = 2500;
int offTime= 1000;
digitalWrite(motorPin, HIGH);
delay(onTime); //waits for onTime milliseconds
digitalWrite(motorPin, LOW);
delay(offTime);
}

void motorOnThenOffWithSpeed() {
int onSpeed = 200;
int onTime = 2500;
int offSpeed = 50;
int offTime = 1000;
analogWrite(motorPin, onSpeed);
delay(offTime);
}

void motorAcceleration(){
int delayTime = 50;
for(int i = 0; i < 256; i++);{
analogWrite(motorPin, 1);
delay(delayTime);
}
for(int i = 255; i >=0; i–){
analogWrite(motorPin, 1);
delay(delayTime);
}
}

what do i have to do to solve it?

Declare a function called motorOnThenOff

C++ is case sensitive... check your capitalisation.

And please use code tags in future.

http://forum.arduino.cc/index.php?topic=148850.0 point 7.

imdannable and awol i just got this program so i dont know what you mean with declare the function could you explain more please thank you very much

Compare it very, very carefully with the place you copied the code from. I'll give you a big clue. Look at the uppercase and lowercase letters in the function highlighted in the error message? Which, by the way, you spelt incorrectly. There is no function called 'motoOnThenOff' in your code.

The call is to a function motorOnThenOff()

You have a function declared after the loop function called motoronThenOff() so you have not declared one called motorOnThenOff() have you?