Jump to content
The simFlight Network Forums

FSUIPC7 and WASM


P-38L

Recommended Posts

Hello

I am programming in LUA and I want to read or write the value of the variable (A:CIRCUIT CONNECTION ON:37) which belong to the analog KingAir.

Inside the directory F:\SteamLibrary\Community\fsuipc-lvar-module I only have the "modules" directory and three files namely:

FSUIPC_WASM.ini

layout.json

manifest.json

 

In the LUA programming it tells me that I cannot read variables of type "A". What should I do or what am I missing to be able to achieve this?

To find out if the LUA program I'm writing is working, I wrote the following line:

ipc.keypressplus(76)

which uses the letter "L" to turn the lights on or off. This works fine from my joystick Here is my code:

local circuitState = ipc.readAvar("A:CIRCUIT CONNECTION ON:37", "Bool")

ipc.display("Circuit Breaker 37: " .. circuitState)

local state = ipc.readLvar("L:Circuit37", 1)

if state == 0 then

    ipc.writeLvar("L:Circuit37", 1)

else

    ipc.writeLvar("L:Circuit37", 0)

end

But it doesn't work

 

Any help will be greatly appreciated.

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.