January 19, 20179 yr Using LINDA 2.8.6 FSX-SE FSUIPC 4 I have coded several switches to manipulate LVars in an MFD I coded for the Lear45H aircraft in FSX-SE. The functions are in the aircraft folder in user.lua. This is the file path: C:\Program Files (x86)\Steam\steamapps\common\FSX\Modules\linda\aircrafts\Lear45H\user.lua Other files in that folder are: actions.lua ExtPFD-Learjet.exe ident.lua Lear45H-user.lua The code in the start of the user.lua are: -- Dummy user functions file-- =========================== -- This file is loaded right after main actions.lua script loaded.-- You can use this file to:-- 1. Override any functions or settings in main script-- 2. Execute any desired startup sequence for this aircraft (i.e. your own c&d state macro)-- 3. ... use your imagination -- Just a message in console _log("[uSER] User's modifications script is loaded...") ident = ipc.get("PATH_ACFT") .. "/Lear45H-user.lua" if file_exists(ident) then _log("[sTART] Functions found: " .. dir) require(ident) else _log("[sTART] Error not found Lear45H-user.lua: ") end strProgram = '"C:\\Program Files (x86)\\Steam\\steamapps\\common\\FSX\\Modules\\linda\\aircrafts\\Lear45H\\ExtPFD-Learjet.exe"' if file_exists(strProgram) then _log("[sTART] Lear PFD found: ") strCmd = 'start "" '..strProgram os.execute(strCmd) else _log("[sTART] Error not found Lear PFD: ") end function L45E_FMS () _L45E_FMS ()end function L45E_NAV () _L45E_NAV ()end function L45E_HSI () _L45E_HSI ()end The Functions for example _L45E_FMS () are located in Lear45H-user.lua. These functions were assigned in the LINDA GUI and were contained in the User Functions drop-down when the Lear45H aircraft was selected. config-user.lua -- ## Jet Joystick ## (073822370) ## {NoSerNum} ############ JSTK["073822370"][1]="Brakes"JSTK["073822370"][5]="Flaps_up"JSTK["073822370"][6]="Flaps_incr"JSTK["073822370"][7]="Gears_toggle"JSTK["073822370"][301]="Trim_ELEVATOR_up"JSTK["073822370"][303]="Trim_AILERON_right"JSTK["073822370"][305]="Trim_ELEVATOR_down"JSTK["073822370"][307]="Trim_AILERON_left" -- ## DTA Pulse ## (16D004890) ## {NoSerNum} ############ JSTK["16D004890"][1]="L45E_HSI"JSTK["16D004890"][2]="L45E_TAC"JSTK["16D004890"][3]="L45M_Btn1"JSTK["16D004890"][4]="L45M_Btn2"JSTK["16D004890"][5]="L45M_Btn3"JSTK["16D004890"][6]="L45M_Btn4"JSTK["16D004890"][7]="L45M_Btn5"JSTK["16D004890"][8]="L45M_Btn6" The LINDA Lua editor showed a few errors which were corrected. When I open the aircraft in FSX-SE, everything seems normal, except I see no log messages from the user.lua file and apparently neither the Lear45H-user.lua module nor ExtPFD-Learjet.exe were loaded. I get an error when I pressed a button in the DTA Pulse HID. The LINDA Console displayed and the FSUIPC Log file contained the following: 13562 Running in "Microsoft Flight Simulator X", Version: 10.0.62615.0 (SimConnect: 10.0.62615.0) 13562 Initialising SimConnect data requests now 13562 FSUIPC Menu entry added 14640 \\DONNADAVEKITCHE\Users\DaveDonna\Documents\Flight Simulator X Files\Lear KAVL.FLT 14640 C:\Program Files (x86)\Steam\steamapps\common\FSX\SimObjects\Airplanes\Lear45H\Lear45.air 32125 Weather Mode now = Theme 36922 Aircraft="Learjet 45 CAF" 36937 System time = 19/01/2017 14:38:05, Simulator time = 14:37:59 (19:37Z) 125297 Starting everything now ... 125359 Using "C:\Program Files (x86)\GoFlight\GFDEV.DLL", version 2.2.6.0 125375 LUA.0: beginning "C:\Program Files (x86)\Steam\steamapps\common\FSX\Modules\ipcReady.lua" 125390 LUA.0: ended "C:\Program Files (x86)\Steam\steamapps\common\FSX\Modules\ipcReady.lua" 125640 LUA.1: *************************** STARTING LINDA ************************** 125656 LUA.1: LINDA:: [sTART] Loading System Configuration files 125765 LUA.1: LINDA:: [sTART] WARNING - All LUA logging switched off !!! 125781 LUA.1: LINDA:: [sTART] Go to Setup LINDA to switch on (if required) 125797 LUA.1: LINDA:: ********************************************************************* 126062 LUA.1: LINDA:: [sTART] System Configuration files loaded 128843 Advanced Weather Interface Enabled 148125 *** LUA Error: ...\common\FSX\modules\linda/aircrafts/Lear45H/user.lua:40: attempt to call global '_L45E_HSI' (a nil value) 204265 Sim stopped: average frame rate for last 83 secs = 8.5 fps Can you help me find what I am doing wrong? I cannot find in the LINDA GUI where to turn on the log but assume any _log function call would put the message on the console and in the FSUIPC log. The folder Lear45H was created using the LINDA GUI with the default FSX aircraft as a pattern. I was getting an error that the action.lua file was missing until I copied it from the FSX Default folder to the Lear45H folder. Thanks
Archived
This topic is now archived and is closed to further replies.