17.01.2012, 02:38
I'm currently trying to use this bit of code which uses an if-goto, if you're not familiar with what that is, see this page.
Here is what I have so far, which compiles perfectly fine, but it does not work and appears to stall my server. (Connected message for about five minutes so far)
Is there anyone who is experienced in this area, and would like to offer assistance? This is confusing the hell out of me.
Here is what I have so far, which compiles perfectly fine, but it does not work and appears to stall my server. (Connected message for about five minutes so far)
pawn Код:
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;
if(last_RandomMessage == RandomSelection)
goto RESELECT;
//We do not return here, because we would like to let the rest of the code run.
}