Errors on tutorial code

I don't think there's anything wrong with the sketch. I've just compiled it without any issues.