How to modify the below code that the motor works (Turns on) for tamount of time

Hi again and thanks for your instruction

The following error message is shown whole compiling after taking out the below code

//temporary code to test the motor control functions
Serial.println("Testing motor functions. Please wait");
motorRight("testing");
delay(5000);
motorStop("testing");
delay(2000);
motorLeft("testing");
delay(5000);
motorStop("testing");
delay(2000);
Serial.println("Finished testing motor functions");

Arduino: 1.6.12 (Windows XP), Board: "Arduino/Genuino Uno"

collect2.exe: error: ld returned 5 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Regards