
01-10-2002, 06:52 AM
|
|
Not in Use
|
Join Date: Mar 2001
Location: N/A
Posts: 1,527
|
|
Quote:
Originally posted by grim_squeaker_x
If your code is something like:
NPC Code:
while (this.var+this.i==2) {
this.var=3;
}
It'll only perform once, even if this.var+this.i becomes 2 again. The solution is quite simply putting it in a timeout loop.
|
If that was true then my this.on while loop shouldn't be working..
btw...I do believe == is in boolean, which in other words would only work for 0 or 1, 0 meaning false, 1 meaning true. So it would just be plain = to work that way .
Oh and I don't want it in a timeout loop, I already have some things preventing that from working well, and it will cause some lag. A timeout is unneeded for this...though, if the while is in fact flawed, it may be the only solution... |
__________________
This account is no longer is use.
|
|
|
|