Quote:
Originally Posted by Kar
pawn Код:
last_RandomMessage = RandomSelection; reselect: if(last_RandomMessage == RandomSelection) {
//Oh no! The random selected the same message as before! This is where we make it select again and again until it gets a different message! //To do this, we just simply create the random again! RandomSelection = random(3); last_RandomMessage = RandomSelection; printf("test"); if(last_RandomMessage == RandomSelection) goto reselect; printf("test passed"); //We do not return here, because we would like to let the rest of the code run. }
test that
|
Continuously prints "test".