Jump to content
The simFlight Network Forums

Bálint Szarka

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Bálint Szarka

  1. Hi, I have gone through the FSUIPC7 Offset Status pdf document looking for any ways of reading the user's aircraft tail number. I did come across an offset, 0x3D00 which reads the title from aircraft.cfg file however I am having trouble using it in an IF formula because of the title length of each cfg file. What I am trying to achieve is to set the configuration of the aircraft per registration automatically when the aircraft is loaded. So as per the offset status pdf one can set the size of 0x3D00 to a maximum of 256. I set it to 60, however when I am checking if the TITLE in the cfg is a particular title because of the excess characters I never get a match in the IF formula. Would you be able to suggest something? I am pretty beginner with all this but I have learnt a lot, maybe there is something I am still missing... Thank you
  2. Thanks for the tip. Sorry for the tag, I learn on the go.
  3. @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?
  4. Thank you so much. I will give it a try.
  5. 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.