I think that may be a typo in the book (I see it in mine as well). AWOL's suggestion would fix it, or you could move 'int buttons[0] = 2' into the setup method and drop the int declaration.
e.g.:
void setup() {
buttons[0] = 2;
Serial.begin(9600);
}