Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

WHEN.. THEN requires following line of code to execute. #196

Closed a1270 closed 10 years ago

a1270 commented 10 years ago
panels on.
lights on.
when inlight then { lights off. }.

Results in lights not shutting off.

panels on.
lights on.
when inlight then { lights off. }.
print "works!".

Results in 'works!' getting printed and lights getting shut off. This may be intentional but i thought i'd test out your new debugger.

Nivekk commented 10 years ago

is this in immediate mode?

a1270 commented 10 years ago

no, this is from a script on disk.

Nivekk commented 10 years ago

Right now when statements don't persist after your script terminates. In this case it likely doesn't have time to evaluate the when. That's why adding a statement seems to make it work.

a1270 commented 10 years ago

In all honesty i don't think anyone would write a script that ended with it. I am testing weird stuff just for fun. Just thought you'd like to know. You can close this if you see fit, else i'll do it in the morning. I am going to call it a night.

Nivekk commented 10 years ago

Sounds good, testing weird stuff is good!