Jump to content
The simFlight Network Forums

Problem with lua log lvar


Recommended Posts

Hi Pete,

I am trying to get information about LVAR used in Wilco's CRJ and have run into a problem.

I have read about the LUA script, put the "log Lvars.lua" script in the module folder of my FSX, assigned F5 and F6 as listed in your exemple and set "LUA program logging" in the logging tab of fsuipc.

I go back to FSX and press F5 and I do not see any window open and no red writing. I click on my item of interrest anyway and then press F6.

A "log lvar.log" file has been created with the following content:

********* LUA: "log lvars" Log [from FSUIPC version 4.703] *********

254797 System time = 01/05/2011 21:53:32, Simulator time = 13:07:25 (17:07Z)

254797 LUA: beginning "C:\Flight Sim X\Modules\log lvars.lua"

259227 >>> Thread killed <<<

259227 System time = 01/05/2011 21:53:37, Simulator time = 13:07:29 (17:07Z)

********* LUA execution terminated: Log Closed *********

The log seems to indicate that the lua script has been executed but I am concerned about the lack of lua window.

Furthermore, if the log is indeed indicating that the script has run, the absence of lvar information would mean that this add-on does not use LVAR.

I tried with both 2D and 3D panel

Am I missing something ?

Thanks in advance.

running FSX SP2 on window 7 64 bits

FSUIPC 4.703 registered

Link to comment
Share on other sites

I have read about the LUA script, put the "log Lvars.lua" script in the module folder of my FSX, assigned F5 and F6 as listed in your exemple and set "LUA program logging" in the logging tab of fsuipc.

I go back to FSX and press F5 and I do not see any window open and no red writing. I click on my item of interrest anyway and then press F6.

Can you tell me where you are reading this example? It isn't something I recognise. Maybe I forgot? A pointer woudl be useful please.

What exactly did you assign to F5 and F6, and why two assignments? Did you try the directly assignable FSUIPC control for logging L:Vars as described in the L:Vars section of the FSUIPC Advanced Users guide?

A "log lvar.log" file has been created with the following content:

********* LUA: "log lvars" Log [from FSUIPC version 4.703] *********

254797 System time = 01/05/2011 21:53:32, Simulator time = 13:07:25 (17:07Z)

254797 LUA: beginning "C:\Flight Sim X\Modules\log lvars.lua"

259227 >>> Thread killed <<<

259227 System time = 01/05/2011 21:53:37, Simulator time = 13:07:29 (17:07Z)

********* LUA execution terminated: Log Closed *********

The log seems to indicate that the lua script has been executed but I am concerned about the lack of lua window.

Well that log shows the Lua plug-in being loaded and terminated forcibly (presumably by a "Luakill"?) before it gets the chance to do anything.

Furthermore, if the log is indeed indicating that the script has run, the absence of lvar information would mean that this add-on does not use LVAR.

Well, maybe, but let it run. If there's a lot of L:Vars it may take it a few seconds to read them all initially. You've terminated it in less than 5 seconds after it started.

Regards

Pete

Link to comment
Share on other sites

I was trying to follow these instructions: (http://www.a2asimulations.com/forum/viewtopic.php?f=23&t=19751)

"STEP 3.

Next, when in your plane in FSX, open up FSUIPC. The first thing we need to do is assign some controls for the LUA program we just moved. I suggest using two key presses you dont use for anything else (I use F3 and F4). Next using FSUIPC set a key for each of these two commands which you should find in the control list:

'Lua log Lvars' and 'LuaKillAll'

There are other controls associated with LUAs, however I only used these two.

Click ok in FSUIPC and return to your cockpit. Now, press the key assigned to 'Lua log Lvars' and you will see a panel with a lot of red text come up, press the key for LuaKillAll and this should disappear(sometimes you need to press both a few times for it to work). If that works you can now read LVars within the cockpit! (this is the key to this whole system and how we can operate these controls, thanks Pete Dowson!!!! (the maker of FSUIPC))

Now start the LUA and then start flicking switches in the cockpit with your mouse, you should see all sorts of things come up in red text (it may be 'rolling' anyway as things like oxygen or hydraulic pressure deplete). Dont worry about trying to read these entries within FSX, there is an easier way!

After trying some controls stop the LUA and go to your 'Modules' folder. Now you should see a file called 'log.lvars.log'

Open this file using notepad and you will see all of the entries that appeared in red on your screen in FSX within this file. Every time you start the LUA in FSX, entries are added to this file, however you need to shut it down and start it again every time you do this wioth the last entires being at the bottom. The entries in this file are Lvars, or local variables and they cover all sorts of things, though their names generally give you an idea of what they do. What use are these things? well we are going to use these entries to create a Macro file.]

As stated, using this procedure does not result in a "lua window with red letters" but does indeed open a lua log. I understand your statement about not allowing enough time and will try again tonight allowing more time. I looked at the documentation you specified ( fsuipc4 for advanced users page 35) . It looks about the same as what I tried except the assigned control suggested is "list local panel variables" instead of "lua log lvars". I will also try this tonight.

I also noted that the Wilco panel I am trying to access seems to be linked to a DLL and not XML. I am not sure if this rules out LVAR usage.

Thanks for your quick response. d:-)

Link to comment
Share on other sites

I was trying to follow these instructions: (http://www.a2asimula...hp?f=23&t=19751)

Hmm. not seen those before.

As stated, using this procedure does not result in a "lua window with red letters" but does indeed open a lua log. I understand your statement about not allowing enough time and will try again tonight allowing more time.

Depending on how many L:Vars there are it can take some time. The Lua plug-in runs in the background and has to first catalog all of those it can find before reading their current values. You are also right in surmising that if there are no L:Vars associated with the current aircraft that there will be nothing shown on the screen.

I looked at the documentation you specified ( fsuipc4 for advanced users page 35) . It looks about the same as what I tried except the assigned control suggested is "list local panel variables" instead of "lua log lvars". I will also try this tonight.

That's a control built into FSUIPC and log s to the FSUIPC log. It doesn't display anything on screen.

I also noted that the Wilco panel I am trying to access seems to be linked to a DLL and not XML. I am not sure if this rules out LVAR usage.

No idea, sorry.

Regards

Pete

Link to comment
Share on other sites

Hi Surfman,

I am assuming that you set one key with Lua Loglvars and the other with LuaKill Loglvars. The instructions are correct and it works fine here. I think that the Wilco CRJ might NOT have ANY LVars and therefore the script stops again entirely on it's own since it makes no sense looping and detecting changes on non-existing variables.

There is a simple way to test this, use a different plane like the B737-800 and if your red window appears you know that it works. The 2D 3D window makes NO difference.

Kosta

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.