Is there a way to declare an if statement saying "if no key is pressed, this will happen" ? ive tried saying things like ( if( waitForInput(1) == 0) ) and (if(waitForInput(FIXED_WAIT) == 0 )) but i guess 0 isn't the value which represents if absolutely NO key is pressed. Any help would be appreciated, thankyou.
What library are you using? Regardless, I would highly recommend looking at the documentation for that function as it ought to tell you the return values.
ah thanks that helped, but now i face another dilemma: i created an if statement saying that if no key is pressed an object will be in continuous movement across the screen based on the last key that was pressed( this is within a switch statement). I wish to halt this movement if any other key is pressed, which breaks this section of the switch statement and moves on the next switch. However when i say something like ( else if a key is pressed break this switch ), it doesn't work. I actually have to hold to key down in order to make it stop. Is there another if statement i should use?