Most of the commonly reported issues and questions are answered in the Frequently Asked Questions (FAQ) option under the Support menu of this website.
*** PLEASE NOTE ***
Your forum account is not the same as the account used in the shop. They are completely separate accounts.
1st December: A new version of the GoFlight Interface Tool for MSFS is now available.
12th November: A new version of the GoFlight Interface Tool for X-Plane is now available.
6th June: A new version of Virtual Flight Sim Hardware is now available (huge update)
21st November: A new version of the GoFlight Interface Tool for FSX/FSXSE/P3D is now available.

follow up on lua script for pmdg 777

Ok, so tried to follow example from ngx to create a script that will turn on both ac packs in the pmdg 777. Basically I created this:

if (getkvar("DATA_OH_AIR_SWITCH_L_PACK") == 0) then
       sendevt("EVT_OH_AIRCOND_PACK_SWITCH_L", MOUSE_LEFTSINGLE)
end

when I try to run it from the lua console, I get the following error:

Error: ...s\GoFlight Interface Tool\LUA\PMDG 777\eric_airpacks.lua:2: unexpected symbol near '<\160>'

Can you please tell me what I did wrong?
Thanks

Comments

  • Hi Bill,

    I think the editor you are using has saved the file in HTML format. Try using notepad or notepad++ as it needs to be a text file.

    Best wishes
    Steve
  • will do, I was just using what automatically opened via the lua console. I'm using windows 10 if that matters
    thanks
  • hi again. I made sure that I was using Notepad as the lua editor and I'm still getting the issue. Can you test that event? Assuming you have PMDG 777. Maybe my code is wrong?
    Thanks
  • here is the complete script for trying to turn on the left pack:

    if (getkvar("DATA_OH_AIR_SWITCH_L_PACK") == 0) then
           sendevt("EVT_OH_AIRCOND_PACK_SWITCH_L", MOUSE_LEFTSINGLE)
    end

    sleep(75)

    setbvar("Bespoke Var 0", getkvar("DATA_OH_AIR_SWITCH_L_PACK"))


    error code:
    Error: ...s\GoFlight Interface Tool\LUA\PMDG 777\eric_airpacks.lua:2: unexpected symbol near '<\160>'

    thanks for your help
  • ok, found the issue. apparently when I copied your NGX example, it had some extra spaces in the code (specifically after "if"

    Deleted the spaces and seems to work
  • I suspect copying and pasting into an editor that understands html, is also copying the hidden html into the file as well. The hidden spaces was probably html.
Sign In or Register to comment.