Masterius

No longer can read/write Lvars

Recommended Posts

I'm running LINDA Version 3.0.12.810, and have been for about two months now.Never really had any problems before, except for a little glitch at setup over my throttle quadrants. I've been writing my own lua scripts, and they've been running just fine up until the middle of last week. Now, however, if a newly-created function attempts to write to, or read from, a Lvars, nothing happens. I can see the function called, I can trace the button as it is activated and deactivated, but the LVar value itself does not change. As well, if I remove a function that has been working, make and save any changes to the user.lib, and then paste that function back inside, it no longer works. 

 

I've no idea what's up, but it's intensely frustrating. 

 

Al

Share this post


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

I would need to see the function to see what is going wrong. Just paste it here. Check the Console or fsuipcX.log to ensure that you are getting any red highlighted lines when your code loads. This will stop everything dead.

Share this post


Link to post
Share on other sites

Code loads up fine, no red lines or error messages. Here is the code itself:

function All_Magnetos_Off_a ()

    ipc.writeLvar("L:Magnetos1Switch",0)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos2Switch",0)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos3Switch", 0)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos4Switch",0)
    ipc.sleep(1500)

end

function All_Magnetos_R_a ()

    ipc.writeLvar("L:Magnetos1Switch",1)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos2Switch",1)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos3Switch", 1)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos4Switch",1)
    ipc.sleep(1500)

end

function All_Magnetos_L_a ()

    ipc.writeLvar("L:Magnetos1Switch",2)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos2Switch",2)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos3Switch", 2)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos4Switch",2)
    ipc.sleep(1500)

end

function All_Magnetos_Both_a ()

    ipc.writeLvar("L:Magnetos1Switch",3)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos2Switch",3)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos3Switch", 3)
    ipc.sleep(1500)

    ipc.writeLvar("L:Magnetos4Switch",3)
    ipc.sleep(1500)

end

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