title: Addition and subtraction not working in iOS app
body: <p>I am trying to make an app that takes away or adds 1 to an integer if the text entered in a text field matches an object in an array.  </p>
  
  <p>The Code in my .m file </p>
  
  <pre><code>NSString *inputtwo =EnterNameText.text;
  BOOL isItright = NO;
  for(NSString *possible in scoreArray1)
  {
      if([inputtwo isEqual:possible] )
      {
          isItright = YES;
          break;
      }
  }
  
  NSString *wronginput = EnterNameText.text;
  BOOL isWrong = NO;
  for(NSString *wrong in scoreArray1)
  {
      if(![wronginput isEqual:wrong ] )
      {
          isWrong = YES;
          break;
      }
  }
  
  static int myInt;
  
  if(isItright)
  {
      myInt++;
  
      NSString *score = [NSString stringWithFormat:@"%d", myInt];
      [scorelabel setText:score];
  }
  
  if (isWrong)
  {
      myInt--;
  
      NSString *score = [NSString stringWithFormat:@"%d", myInt];
      [scorelabel setText:score];
  }
  </code></pre>
  
  <p>So the program checks if there is a match in the array called scoreArray1, if there is it will add 1 to myInt, if not it will take one away.  </p>
  
  <p>The problem is it is only taking one away regardless whether it is right or wrong.</p>
  
  <p>Thanks for your time.</p>