help with code

just got a prob with this line

cred = (count - maxCount);

just got a prob with this line

What is the prob(lem)?

Sorry yes I should have said won't compile

I'm not in the mood for twenty questions. Where is the rest of your code and the error message that the compiler told you but that you won't post?

static int lastState = 0;
static int count = 0 ;   //number of pulses for each card
static int countb = 0 ;
static int cerd = 0 ;

int outputPin = 13;     //names pins
int inputPin =10;
int fullPin =8;
int breakPin =5;
int maxCount ;     //number of pulse's before this card shuts off
//int newcard = 0;
void setup()
{
  Serial.begin(9600);     //just for now so i can see what's going on 
  digitalWrite (fullPin, HIGH);
  pinMode(outputPin,OUTPUT);
  pinMode(inputPin, INPUT);     //make's pin 10 input pin 
  pinMode(breakPin, INPUT);      //this is used to breakout of while loop

  digitalWrite (outputPin, LOW);


}

void loop()




{
bailout: // this is for the goto statment ( sorry but i can not thing of any other way but goto )
  digitalWrite(outputPin, LOW); 
  Serial.println("Place Card on Bar");
  while (Serial.available() == 0);     // this is going to be input from card
  int val = Serial.read();     //will be input from card reader
  
  Serial.println("do not remove until you have finished");
  if (val == '1')      //if this is the card number do the next stuff if not keep looking
  
  
  {

Serial.println("card 1  ");

    while(!digitalRead(5))

    {
      
      
      int maxCount =20;
      if (count > maxCount)     //when count gets to the set number sends 5v to pin 13
      { 
        Serial.println("NO CREDIT LEFT");
        digitalWrite(outputPin, LOW);   // power to relay to shut flow 
        goto bailout; 

      } 


      digitalWrite (outputPin, HIGH);
      int newState = digitalRead(inputPin);  //pulse from flow meter

      if (newState != lastState)     //detect change

      {

        Serial.println(count);   //just for now so i can see what's going on
        count ++;    //adds one to count

      cred = (count - count);

        lastState = newState;


      }  
    }       


  }

  // looks for next card number


}
static int lastState = 0;
static int count = 0 ;   //number of pulses for each card
static int countb = 0 ;
static int cerd = 0 ;

Variables that are global do not need to be static. These are global...

static int cerd = 0 ; cred = (count - count);

count - count, for every value of count, will be 0. cerd and cred are not the same variable.

static int lastState = 0;
static int count = 0 ;   //number of pulses for each card
static int countb = 0 ;
static int cerd = 0 ;

int outputPin = 13;     //names pins
int inputPin =10;
int fullPin =8;
int breakPin =5;
int maxCount ;     //number of pulse's before this card shuts off
//int newcard = 0;
void setup()
{
  Serial.begin(9600);     //just for now so i can see what's going on 
  digitalWrite (fullPin, HIGH);
  pinMode(outputPin,OUTPUT);
  pinMode(inputPin, INPUT);     //make's pin 10 input pin 
  pinMode(breakPin, INPUT);      //this is used to breakout of while loop

  digitalWrite (outputPin, LOW);


}

void loop()




{
bailout: // this is for the goto statment ( sorry but i can not thing of any other way but goto )
  digitalWrite(outputPin, LOW); 
  Serial.println("Place Card on Bar");
  while (Serial.available() == 0);     // this is going to be input from card
  int val = Serial.read();     //will be input from card reader
  
  Serial.println("do not remove until you have finished");
  if (val == '1')      //if this is the card number do the next stuff if not keep looking
  
  
  {

Serial.println("card 1  ");

    while(!digitalRead(5))

    {
      
      
      int maxCount =20;
      if (count > maxCount)     //when count gets to the set number sends 5v to pin 13
      { 
        Serial.println("NO CREDIT LEFT");
        digitalWrite(outputPin, LOW);   // power to relay to shut flow 
        goto bailout; 

      } 


      digitalWrite (outputPin, HIGH);
      int newState = digitalRead(inputPin);  //pulse from flow meter

      if (newState != lastState)     //detect change

      {

        Serial.println(count);   //just for now so i can see what's going on
        count ++;    //adds one to count

      cred = (count - maxCount);

        lastState = newState;


      }  
    }       


  }

  // looks for next card number


}

sorry forgot i put the count - count to see if i could work out why it was not working

Thanks .....