Closed civilwargeeky closed 10 years ago
This isn't related at all to the problem you're describing but when I tried following your code to see what the problem is I noticed this in passing: Your conversion factor of 907.185 seems to be assuming that mass is given in Imperial tons. It's not. It's given in metric tons. This could cause problems for you once the lock issue is fixed.
Strangely it does seem to work right in this example:
set b to 0.
lock a to b.
until b = 5 {
set b to b + 1.
print "a=" + a + " b=" + b .
}.
Which gives this output as expected:
a=1 b=1
a=2 b=2
a=3 b=3
Where it seems to fail is when using one of the built-in keywords like ALTITUDE, MAXTRHUST, and so on. It seems like the update works as long as it's based on a user variable not a keyword.
Hmmm. That is somewhat odd. Do you know whether or not this is intended behavior? If its not, I think that this issue should be labeled as a bug (If that's in my power, I'm not sure how to label it...). Regardless, thank you for the help, and until this is fixed (if unintended), I suppose I will be able to just set "base" variables in my loop, and the other variables should update off of that. Thanks.
Also, thanks for the tip with imperial vs metric tons. All this time I had been thinking about it wrong :)
I've done some overhauling to the expression system which I believe will solve this.
I tested it by locking a variable to sessiontime + 4 and then checking that variable inside an until loop. It checked out.
If you're able to compile from source, give the latest push a try.
Cool! Thank you. I'm unable ( or unwilling to go through the trouble of ) compiling this, but will be glad to use it when you next update.
So I picked up KOS again the other day after not having tried it since around initial release. I wanted to make a simple hover program, and I have since made a basic setup. However, it seems that my lock statements are not being updated (at least inside an until loop). If I have:
Then it prints "0" It does the same thing if I attempt to put the lock statement inside the loop. However, if I use a "set" statement outside the loop, and then another "set" statement inside the loop to repeatedly set variables, it works properly. I don't think is intended.
Full Code for Reference: