How to exit a nested if statement

Thanks for the reply!

managed to get it to work for the moment by moving the exit function outside the next if statement.Does this just do the same as the reset button on the actual board? Could you point me in the direction of a tutorial on how to include a boolean for a button press into if statements please? Tried the arduino site for booleans and i was unsure how to include it in this specific code. Thanks