Sign in to follow this  
Guest iagman

Problem with click code

Recommended Posts

This is the click section of code inside a mouse area.(L:LightA, number) ! if{(L:SetValue, number) (>L:MemA, number)1 (>L:LightA, number) }els{ (L:MemA, number) (>L:SetValue, number)0 (>L:MemA, number)0 (>L:LightA, number) }On the first click, the IF parts works perfectly with the value inside the (L:SetValue, number) variable being stored into the (L:MemA, number) variable. This is verified by another gauge showing the value in each of these variables.On the second click, the ELS part runs and resets the MemA and LightA variables back to zero. But the value stored inside the (L:MemA, number) variable does not get transfered back into the (L:SetValue, number) variable. Can someone give me a clue why this isn't working?Glenn

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Glenn,At first sight and assuming (L:LightA, number) initializes with 0, on the first click, MemA takes the value of SetValue; therefore SetValue has to be defined elsewhere in the code BEFORE, so in that part SetValue will take its value every cycle, overwriting the value transfered from MemA inside the ...Just a guess.Tom

Share this post


Link to post
Share on other sites

Thanks, Tom.I'll go back through the code to see if there is a problem elsewhere. This one line has the entire gauge on hold. I even dreamed about it. Darn, gotta get a life.Glenn

Share this post


Link to post
Share on other sites

You were right, the problem lay elsewhere. Working now. Thanks for the help.Glenn

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this