help with println

can any one tell me whats wrong with line 71.... Serial.println("You Have £",cred);it will not compile

thanks

static int lastState = 0;
static int count = 0 ;   //number of pulses for each card
static int countb = 0 ;
static int cred = 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

      {


        count ++;    //adds one to count

        cred = (maxCount - count);
        Serial.println("You Have £",cred);   
        lastState = newState;


      }  
    }       


  }

  // looks for next card number


}

can any one tell me whats wrong with line 71.... Serial.println("You Have £",cred);it will not compile

It's your use of the second variable 'cred' in the print statement. It has no use or purpose when printing a string of data inside the " " argument. What did you think it was needed for? That second argument is used to tell the function what kind of data format to use in sending the data out the serial port, decimal, hex, binary or in the case of printing a float variable how many digits of the decimals to print out. From the reference:

Syntax
Serial.println(val)
Serial.println(val, format)

Parameters
val: the value to print - any data type

format: specifies the number base (for integral data types) or number of decimal places (for floating point types)

I thought we'd agreed that 'goto bailout;' could be replaced by a simple 'return;'

I thought we'd agreed that 'goto bailout;' could be replaced by a simple 'return;'

We also agreed that static is unnecessary for global variables, but that's still there, too.