issue with programming a gear shifter

So I have a 6 position gear shifter on an arcade cabinet that has 4 switches, up, down, left and right. They work in combination to determine what gear the shifter is in like, up and left is 1st, just up is 3rd, and up and right is 5th. I put together this bit of code to read when the shifter is put into gear and determine what button to press to correspond to where it is, but it's not working right, I get multiple outputs from a given position. I'd appreciate help in fixing it so it only outputs one button for each position.

if (gearup == 0)
 { 
   if (gearleft == 0)
   {
    Gamepad.press(7);
   }
   else if (gearright == 0)
   {
    Gamepad.press(11);
   }
   else {
   Gamepad.press(9);
   }
 }

 else if (geardown == 0)
 { 
   if (gearleft == 0)
   {
    Gamepad.press(8);
   }
   else if (gearright == 0)
   {
    Gamepad.press(12);
   }
   else {
   Gamepad.press(10);
   }
 }
 else {
   Gamepad.release(7);
   Gamepad.release(8);
   Gamepad.release(9);
   Gamepad.release(10);
   Gamepad.release(11);
   Gamepad.release(12);
 }

What part of [code][/code] tags is so difficult to understand?

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please post your full sketch.

I think this contains the full sketch: http://forum.arduino.cc/index.php?topic=466678

@worldspawn
I think you first need to fix the issue I mentioned in the above thread before starting a new thread. The questions might be related or they might not be related.

So, this code actually works, problem was on the hardware side.

@worldspawn, do not cross-post. Thread locked.