How do i add a loop??

 for (int i = 0; i< loopTimes; ++1){

"1" is a constant - you can't increment it like this.

Either

 for (int i = 0; i< loopTimes; ++i){

or

 for (int i = 0; i< loopTimes; i+=1){

or

 for (int i = 0; i< loopTimes; i++){

There is no need for this:

   for(int r=0; r<10; r++)
  {
    if(r<15)
    {

Maybe it is best to breakdown the syntax of a "for" loop.

for (int i = 0; i < loopTimes; ++i)

could also be written as:

int i = 0;
while (i < loopTimes) {
  //the body of you loop goes here

  i = i + 1;
}

So, we have four distinct parts;
1)the initialisation, (int i = 0;)
2)the condition for keeping looping, ( i < loopTimes)
3)the body of the loop,
4)and the action to perform at the end of each loop before going back to 2). (i = i + 1)

way hey it works! Thanks for that! Just for my reference, and as i am playing with arduino's capabilities, i still confused as to why this is in the set up.

What if i was using that to respond to an analog input from a potentiometer? How would you 'call' it up or activate your loop in void loop?

I used to do PBasic years ago and have therfore got an urge for a " goto loop " sorry, I'm just trying to get my head around this!

What if i was using that to respond to an analog input from a potentiometer?

If you mean "how do I set the number of loops, based on the value read from a potentiometer?", very simply:

int loopTimes = map (analogRead (POTPIN), 0, 1023, 0, 20);

This reads an analogue input (which returns a value in the range 0...1023) and maps that range onto 0..20.
Then use "loopTimes" as the loop control as you already are doing.

So how would i get the loops to loops once the value is reached, as since this is in the setup i'm unsure of how i would go about coding that?

so if i had:

potvalue = analogRead(Dial);
  
  if(potvalue/68 == 0){
[b]then activate loop and cycle 3 times only[/b]

does that make sense?

does that make sense?

No, not really.
What is the significance of the divide by 68?

oh i was just playing with how many values my potentiometer could have, nothing significant about the no.