Error messages are usually longer than that. I'll bet your code is longer too. Is this a sketch right out of a book? If so, then re-type it in, as it looks as if you got something wrong. Maybe the last line of your snippet should read "Serial.begin(9600);" instead of what you posted.