library compiling error

Hi! I working on my first arduino library and I have error on compiler.I don't know what is this.

This is header

[
#ifndef MotorDriver_h
#define MotorDriver_h

#include "Arduino.h"

class MotorDriver
{
  public:
    MotorDriver(int enable1,int directionpin11,int directionpin12,int enable2,int directionpin21,int directionpin22);
    void setSpeed(char motor,int speed1);
  private:
     int _enable1;
     int _directionpin11;
     int _directionpin12;
     int _enable2;
     int _directionpin21;
     int _directionpin22;
     int _speed1;
     char _motor;
     int _speed;
}

#endif
]

and .cpp

[code][
#include "Arduino.h"
#include "MotorDriver.h"

MotorDriver::MotorDriver(int enable1,int directionpin11,int directionpin12,int enable2,int directionpin21,int directionpin22)
{
  pinMode(enable1, OUTPUT);
  pinMode(directionpin11, OUTPUT);
  pinMode(directionpin12, OUTPUT);
   pinMode(enable2, OUTPUT);
  pinMode(directionpin21, OUTPUT);
  pinMode(directionpin22, OUTPUT);
  _enable1 = enable1;
  _directionpin11 = directionpin11;
  _directionpin12 = directionpin12;
  _enable2 = enable2;
  _directionpin21 = directionpin21;
  _directionpin22 = directionpin22;
}

void MotorDriver::setSpeed(char motor,int speed1)
{
  _motor = motor;
  _speed1 = speed1;
 _speed=map(abs(_speed1),0,100,0,255);
 if(_motor == 'A'){
  if(_speed1 > 0){
   digitalWrite(_directionpin11,HIGH);
   digitalWrite(_directionpin12,LOW);
   analogWrite(_enable1, _speed); 
  } else {
   digitalWrite(_directionpin11, LOW);
   digitalWrite(_directionpin12, HIGH);
   analogWrite(_enable1, _speed); 
  }
 }
  if(_motor == 'B'){
  if(_speed1 > 0){
   digitalWrite(_directionpin21, HIGH);
   digitalWrite(_directionpin22, LOW);
   analogWrite(_enable2, _speed); 
  } else {
   digitalWrite(_directionpin21, LOW);
   digitalWrite(_directionpin22, HIGH);
   analogWrite(_enable2, _speed); 
  }
 } 
}
]

Compiler show me this

In file included from MotorDriver.cpp:2:0:
MotorDriver.h:6:1: error: new types may not be defined in a return type
 class MotorDriver
 ^
MotorDriver.h:6:1: note: (perhaps a semicolon is missing after the definition of ‘MotorDriver’)
MotorDriver.cpp:4:125: error: return type specification for constructor invalid

I'm sry becaus informations is in code

Hi leon3428

The hint is in the error message ;)

MotorDriver.h:6:1: note: (perhaps a semicolon is missing after the definition of 'MotorDriver')

Adding the missing semicolon clears the error.

Regards

Ray