Jump to content
Sign in to follow this  
Guest iagman

Problem with click code

Recommended Posts

Guest iagman

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

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
Guest iagman

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
Guest iagman

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...