DC-motors doesn't work when attaching Servo

I've recently started a project to make an autonomous car.
The problem that i have is that when i attach a servomotor to my vehicle one wheel stopps working. My first thought was that it might have been a power issue, but the thing is that even though the servo isn't connected to any pin, the wheel stopps working when i upload the code.

I'm currently running the vehicle on a 9v battery.
Arduino Uno
Arduino SensorShield v5.0
L298N motor driver

It only works when i comment "myservo.attach(3)".

void setup() {
for(int i=0;i<2;i++) {
pinMode(RW*,OUTPUT);*
_ pinMode(LW*,OUTPUT);_
_ pinMode(Speed,OUTPUT);
}
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
pinMode(13,OUTPUT);
// myservo.attach(3);
}
void loop() {
for(int i=0;i<2;i++) {
analogWrite(Speed,200);
}
digitalWrite(RW[0],HIGH);
digitalWrite(LW[0],HIGH);
digitalWrite(RW[1],LOW);
digitalWrite(LW[1],LOW);
}*_

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool. I recommend you to use the standard IDE instead.

Is there a part of your sketch you forgot to post? Please post all of your code.

Sorry, this is the code.

const int LW[] = {8,7};
const int RW[] = {5,4};
const int Speed[] = {9,6};

      //Servo & Sonar//
//--------------------------------//
#include <Servo.h>
Servo myservo; 

const int trigPin = A0;
const int echoPin = A1;
long duration;
int distance;


void setup() {
    for(int i=0;i<=1;i++) {
    pinMode(RW[i],OUTPUT);
    pinMode(LW[i],OUTPUT);
    pinMode(Speed[i],OUTPUT);
    }
    pinMode(trigPin,OUTPUT);
    pinMode(echoPin,INPUT);  
    pinMode(13,OUTPUT);
    //myservo.attach(3);

}

void loop() {

      for(int i=0;i<=1;i++) {
        analogWrite(Speed[i],150);
      }
        digitalWrite(RW[0],HIGH);
        digitalWrite(LW[0],HIGH);
        digitalWrite(RW[1],LOW);
        digitalWrite(LW[1],LOW);
}

On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins.

From the Servo library reference.

Yes, basically the Servo library uses a 16 bit timer, which on the Uno is timer1 which drives pins 9 and 10.
There is only one 16-bit timer on the Uno.

I've changed the inputpin to 10, this solved the problem that one wheel stopped, thanks!
But now a new error occurred, the wheels won't respond to a analogWrite below 255, is this also because of the servo library?

EDIT: When i comment myservo.attach(3), they respond to values below 255.

const int LW[] = {8,7};
const int RW[] = {5,4};
const int Speed[] = {9,10};

      //Servo & Sonar//
//--------------------------------//
#include <Servo.h>
Servo myservo; 

const int trigPin = A0;
const int echoPin = A1;
long duration;
int distance;


void setup() {
    for(int i=0;i<=1;i++) {
    pinMode(RW[i],OUTPUT);
    pinMode(LW[i],OUTPUT);
    pinMode(Speed[i],OUTPUT);
    }
    pinMode(trigPin,OUTPUT);
    pinMode(echoPin,INPUT);  
    pinMode(13,OUTPUT);
    myservo.attach(3);

}

void loop() {

      for(int i=0;i<=1;i++) {
        analogWrite(Speed[i],255);
      }
        digitalWrite(RW[0],HIGH);
        digitalWrite(LW[0],HIGH);
        digitalWrite(RW[1],LOW);
        digitalWrite(LW[1],LOW);
}

Neither pins 9 or 10 can support PWM (analogWrite) when the Servo library is used.

Apparently I can't read, thanks for all your help, much appreciated!