Well, there are all sorts of things you
could be doing wrong. There is no way to tell what it might be from what you have posted. First of all, it is not clear what the scope of p1NO and p1YES are. Are they instance variables of a single object? Are they static variables belonging to no object at all? Then there is the question of whether or not good and bad are being called once and only once. If they are called twice, then the variable might go up to 2 and thus still fail the (==0) test. You have some simple debugging to do.
By the way, are you aware that you have double equal signs in
Code:
p1YES == 0;
p1NO == 0;
With the double equal signs, these statements are meaningless.