Errors in code

Hi, my project involves running 3 steppers at various speeds using the Arduino Uno. Note, the library functions can be checked here: AccelStepper: AccelStepper Class Reference The only errors in my code thus far are as follows:

int pos = 100000; //number of steps for each motor to travel

void setup()
{
stepper1.targetPosition(pos);
stepper2.targetPosition(pos);
stepper3.targetPosition(pos);
}

For which I get the following error:

Arduino_Project_3.ino: In function 'void setup()':
Arduino_Project_3:26: error: no matching function for call to 'AccelStepper::targetPosition(int&)'
C:\Users\Ali\Pictures\Documents\Arduino\libraries\AccelStepper/AccelStepper.h:325: note: candidates are: long int AccelStepper::targetPosition()

Any ideas?

100000 is to high a number for an int data type. try long pos = 100000;

I've tried that and I still get a similar error :confused:
Arduino_Project_3.ino: In function 'void setup()':
Arduino_Project_3:26: error: no matching function for call to 'AccelStepper::targetPosition(long int&)'
C:\Users\Ali\Pictures\Documents\Arduino\libraries\AccelStepper/AccelStepper.h:325: note: candidates are: long int AccelStepper::targetPosition()

There error message looks pretty clear to me: The targetPosition method doesn't accept a long as an argument. In fact, if you look at the documentation you linked, it doesn't accept an argument at all. That method returns the currentTarget position, you appear to be trying to use it to set the current target position.

Ahh, I see. Sorry I'm quite new to this programming stuff. I used the 'moveTo' command instead and it's corrected everything. Thanks alot.