buttons

i need help with bumper buttons im useing 2 vex Limit Switch that i rewird 4 right and left bumpers but in my code it randomly jumps to the left or right code lines

delay=255 rate=40 drive: HSERVO [p12\1\200,p13\255\230,p14\1\200,p15\255\230] button p4,0,delay,rate,count1,1,right button p6,0,delay,rate,count2,1,left goto drive