26.01.2014, 01:51
In the following code, the while loop fails to assign a value to a variable.
The value of rNum will always be zero. I don't know if this is an issue for me only. The way I got around this is by doing the following.
I know it isn't the end of the world but why would this happen?
Код:
enum IN { rNum, rVar }; new lCheck[MAX_PLAYERS][IN]; lCheck[player][rNum] = 0; while(lCheck[player][rNum] == 0)lCheck[player][rNum] = random(50);
Код:
new rRock = 0; while(rRock == 0)rRock = random(50); lCheck[player][rNum] = rRock;