multiplying ??

hi , ive only recently started with the arduino , seemed very easy untill i had to start using other people libraries and then this . Im trying to multiply rpm by 2 but cannot get it working its actually part of a much bigger sketch but was trying to work it out on this small simplified one first .How the sketch is this does multiply by 2 but only to the closest 514 . Any help would be appreciated

#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>

COBDI2C obd;


void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);

obd.begin();
  // initiate OBD-II connection until success
  while (!obd.init());
}

void loop() {
  // put your main code here, to run repeatedly:
int rpm;
int rpma=(rpm*2);

if (obd.read(PID_RPM,rpm));


Serial.print(rpm);
Serial.print("\t");
Serial.println(rpma);

delay (1);
}

You are re-initializing RPM every time you run loop, move the: int rpm; int rpma; to Setup(), and then in the loop(), just have rpma=rpm*2;

Also make sure you aren't going to hit max int (about 32000)

move the: int rpm; int rpma; to Setup()

sp. "outside of setup() and loop()"

If you move them to setup(), they won't be in scope in loop()

thanks awol , its working well now .