Two buttons/multiple buttons pushed

Hello,
I am very new to the Arduino. Just wondering:
right now I want to collaborate processing and Arduino
for these:
I wanna do something like:
if I push two buttons at same time, the arduino will store these on-switch pin numbers and return the number of activate pins ( in this case, 2)
right now i have code:
like:

int player1Pins = 2;
int player1Pin [] = {3,2};
for(int i = 0; i< player1Pins; i++){
buttonState = digitalRead(player1Pin*);*

  • if(buttonState != lastButtonState){*

  • if(buttonState == HIGH ){*

_ Serial.println(player1Pin*);*_

* buttonPushTimes++;*

* }*
* delay(50);*
* lastButtonState = buttonState; *
}
However, the serial wont print out anything if I pushed both switch together.
Any help? Thank you guys!

Might be because half the code is in italics.

Always read first and write second. That's what separates the good programmers from the crappy ones.
How To Use This Forum - Please Read

You can NOT use the same pair of variables to determine whether two (or more) different pins changed state. You need to keep track of the previous state of each pin, separately.