Jump to content
Sign in to follow this  
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

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.


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

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

What aircraft?


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

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...