Jump to content
The simFlight Network Forums

Bálint Szarka

new Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Bálint Szarka

  1. Thanks for the tip. Sorry for the tag, I learn on the go.
  2. @John Dowson do you think that you would be able to pin point me towards a direction where I can figure out how can I continuously keep checking until a condition is met?
  3. Thank you so much. I will give it a try.
  4. Hi everyone, I am coming here to ask for guidance as a newbie in writing a lua script that would accomplish a very simple task. My intention is to have a lua script that would check whether the engine anti ice in four engine aircraft (FBW A380 ) is ON, and if so then either leave it ON or turn it OFF based on which button I press. My current script doesn't seem to work, and I get the following error in the FSUIPC7.log 18391 *** LUA Error: E:\FSUIPC7\LuaFiles\FBW_TEST.lua:3: '<name>' expected near '"XMLVAR_MOMENTARY_PUSH_OVHD_ANTIICE_ENG1_PRESSED"' My LUA script is the following: function engantiice() val1 = ipc.readLvar(L:"XMLVAR_MOMENTARY_PUSH_OVHD_ANTIICE_ENG1_PRESSED") val2 = ipc.readLvar(L:"XMLVAR_MOMENTARY_PUSH_OVHD_ANTIICE_ENG2_PRESSED") val3 = ipc.readLvar(L:"XMLVAR_MOMENTARY_PUSH_OVHD_ANTIICE_ENG3_PRESSED") val4 = ipc.readLvar(L:"XMLVAR_MOMENTARY_PUSH_OVHD_ANTIICE_ENG4_PRESSED") if val1 == 1 then ipc.execPreset("A380X_OH_ANTIICE_ENG1_TOG", 0) end if val2 == 1 then ipc.execPreset("A380X_OH_ANTIICE_ENG2_TOG", 0) end ipc.sleep(700) if val3 == 1 then ipc.execPreset("A380X_OH_ANTIICE_ENG3_TOG", 0) end if val4 == 1 then ipc.execPreset("A380X_OH_ANTIICE_ENG4_TOG", 0) end end Could anyone explain to me in a very simplified language on what am I doing wrong here? Please note I am far away from being a programmer of any kind. I am just trying to learn this. I have watched some videos on how to write a conditional LUA script but those are never ever dealing with flight sim and variables etc, so it's difficult for me to put in perspective when it comes flight sim and its related differences. I would appreciate if someone could chime in and say what's wrong above? Thank you so much, Balint Szarka
×
×
  • 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.