P-38L Posted 2 hours ago Report Share Posted 2 hours ago 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now