Regarding the first problem:
You are initializing an array with a capacity to fit six integer items:
Then you are trying to assign a value, however the syntax is incorrect, making your program attempt to re-initialize the buttons variable:
int buttons = 2;
Instead for assignments you no longer need to keep in the type instruction, therefore use:
buttons = 2;
This will work.
As per usage... you are right the variable is actually not being used anywhere within the rest of the program routine, therefore it is safe to remove these two lines.
Hope this helps.