I also get an error which sounds like this:
It either "is" or it "isn't" - it doesn't "sound like".
That looks like you've got one too many closing braces "}".
I mentioned this earlier.
int ping(){
long duration, inches, cm;
pinMode(pingpin,OUTPUT);
digitalWrite(pinpin,LOW);
delayMicroseconds(2);
digitalWrite(pingpin;HIGH);
delayMicroseconds(5);
digitalWrite(pingpin,LOW);
pinMode(pingpin,INPUT);
return pulseIn(pingpin,HIGH);
}