Jump to content
The simFlight Network Forums

"ERROR", Ref 19781, Index param 2


Recommended Posts

Posted

Hello

I wanted to find out why I'm getting this error message. don't know where to look. thank you for your feedback

Exception 1 "ERROR", Ref 19781, Index param 2 on TransmitClientEvent, object=0, id=68038 (????), data=67108864

Kind Regards

Ramon

 

FSUIPC7.log

Posted
12 hours ago, Metall4You said:

Exception 1 "ERROR", Ref 19781, Index param 2 on TransmitClientEvent, object=0, id=68038 (????), data=67108864

This error usually indicates an issue with simconnect and is temporary, but in this case I am not sure as I would expect to see more than just one error. Do you see this all the time or occasionally? is this causing any issues?

Your log file does show some issues and is rather strange...could you please download 7.5.1 again and re-install to be sure that you are using the latest official 7.5.1 version please.
Also, there are some re-connection attempts so you should tune the startup parameters - set the following in your FSUIPC7.ini file:
    DetectToConnectDelayAuto=100
    InitialStallTime=0

Then can you switch off all logging (including lua plugin logging) and activate logging for Buttons & Keys and Events only, and show me / attach your FSUIPC7.log and FSUIPC7.ini files when you get the error.

 

Posted

Hi John

Many thanks for your Support. Would be happy to send you the INI and LOG files. My problem at the moment is that I can't get the LVAR 'FS2CEW_RAASPRO_MASTER_SWITCH' to work. would like to control the RAAS power button from FSCrew using Lua script. 

Error: **** Lvar 'FS2CEW_RAASPRO_MASTER_SWITCH' not found: cannot add to offset 0xA010

Thanks for your help

FSUIPC7.INI FSUIPC7.log

Posted
21 minutes ago, Metall4You said:

My problem at the moment is that I can't get the LVAR 'FS2CEW_RAASPRO_MASTER_SWITCH' to work. would like to control the RAAS power button from FSCrew using Lua script. 

Error: **** Lvar 'FS2CEW_RAASPRO_MASTER_SWITCH' not found: cannot add to offset 0xA010

Isn't it obvious what that error is? The lvar is not available. This is probably because since version 7.5.0, only an initial scan for lvars is performed, as continual scanning for lvars can cause the WASM to crash. If an lvar that you want to use is not picked-up in the first scan, there are a few things you can do:

1. Increase the WASM ini parameter LvarScanDelay. This ini parameter determines the delay from aircraft load to the first lvar scan, and the longer the delay, the more lvars will be detected. Try increasing this value. See the WASM section in the Advanced User guide for further details. 
2. You can have a lua script to test for the existence of an lvar and if not available, then you can request an WASM reload, e.g.

Quote
-- Check Lvar exists
while (ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH") == nil)
do
  ipc.reloadWASM()
  ipc.sleep(200) -- wait before checking again
end

-- Lvar now available - continue

As for this error: 

18 hours ago, Metall4You said:

Exception 1 "ERROR", Ref 19781, Index param 2 on TransmitClientEvent, object=0, id=68038 (????), data=67108864

That looks to be due to an offset request at 0x0284 to update the ADF1 Standby frequency, and FSUIPC was using the wrong control number, using 68038 which doesn't exist. I have corrected this in the attached version if you could try it.

John

FSUIPC7.exe

Posted

Hi John

Many thanks for the new exe file, the error has disappeared. I have installed the code for the lvar and it is loaded. 
However, if I now use "ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH ", 1) to write value 1 to ON I get the error:

*** LUA Error: C:\Homecockpit 737\FSUIPC7\raas_power_switch.lua:50: Event proc not found

if I use "Set lvar" from the form of fsuipc it works, but the entry looks like this : "FS2CEW_RAASPRO_MASTER_SWITCH 0046"

Thanks for your help

FSUIPC7.log

Posted

Hi John

 

If I assign the offset for the lvar in the fsuipc.ini and I reload WASM with ipc.reloadWASM(), is the offset assigned when it is available or do I have to recreate it with LUA?

Ramon

Posted
7 hours ago, Metall4You said:

However, if I now use "ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH ", 1) to write value 1 to ON I get the error:

*** LUA Error: C:\Homecockpit 737\FSUIPC7\raas_power_switch.lua:50: Event proc not found

That is an error on line 50 of the lua script - please attach that script.

1 hour ago, Metall4You said:

If I assign the offset for the lvar in the fsuipc.ini and I reload WASM with ipc.reloadWASM(), is the offset assigned when it is available or do I have to recreate it with LUA?

No - the offset will be populated when the lvar becomes available,

Posted

Are you sure that was the script that was running? The line numbers in the log don't match that script...
There are errors in the ipc.log statements in that script - you need to provide one string argument and cannot provide separate arguments. Try the attached and show me the log again if any errors.

John

 

raas_power_switch.lua

Posted

Hallo John

Was ich auch nach dem Lesen der Lua-Bibliothek nicht ganz verstehe, ist, ob ich den Wert des LVAR direkt mit  ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH", 1) ändere oder den in der fsuipc.ini mit 1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000 definierten Offset mit ipc.writeUD("A000", 1) ansprechen muss. 

beides, weil der gewünschte Erfolg noch nicht eintritt.

fsuipc.ini-Eintrag:

[LvarOffsets]
1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000

wenn ich es mit set var aus dem fsuipc-Programm mit Parameter 1 ausführe , funktioniert es

Mit freundlichen Grüße

Ramon

raas_power_switch.lua

Posted
37 minutes ago, Metall4You said:

Was ich auch nach dem Lesen der Lua-Bibliothek nicht ganz verstehe, ist, ob ich den Wert des LVAR direkt mit  ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH", 1) ändere oder den in der fsuipc.ini mit 1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000 definierten Offset mit ipc.writeUD("A000", 1) ansprechen muss. 

beides, weil der gewünschte Erfolg noch nicht eintritt.

fsuipc.ini-Eintrag:

[LvarOffsets]
1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000

wenn ich es mit set var aus dem fsuipc-Programm mit Parameter 1 ausführe , funktioniert es

Mit freundlichen Grüße

Both should work, but if you are adding to an offset as UB (Unsigned Byte), then you should use ipc.writeUB, and not ipc.writeUD

Your lua script doesn;t make much sense.  Why are you reding the value of offset A000, when that would be passed into the event function, e.g.
   function ToggleRAASPower(offset, value)
   ...
   end

And why are you writing to update the lvar, when that event function is being called on the lvar change? With that script running, the lvar will just always stay at the same value, either 0 or 1.

But I think your issue is that the lvar is still not being added to the offset. Are you still seeing a message like this:

     5437 **** Lvar 'FS2CEW_RAASPRO_MASTER_SWITCH' not found: cannot add to offset 0xA010
?

Can you please set WAPI Debug level logging, as well as logging for Lua Plugins, and show me your FSUIPC7.log file as well as the lua script again if modified..


 

Posted
8 hours ago, Metall4You said:

I changed the script again and set WASM debug. 

I asked for WAPI debug logging (Log -> WAPI -> Debug) mot WASM debug logging, but it doesn't matter.

You should rename your script -  raas_power_switch contains 17 characters, and there is a limit of 16 chars for lua script names. This can cause issues.

But the problem is this:

Quote

while (ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH") == nil)

It seems that nil is no longer being returned when the lvar doesn't exist. I have no idea why or when this stopped working - I will investigate this next week, For the time being, change that to:

Quote

-- Check Lvar exists
id = ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH")
while ( id == nil or id > 65535 or id < 0)
do
  ipc.reloadWASM()
  ipc.sleep(200) -- wait before checking again
  id = ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH")
end
raasvar=1

Are you sure that lvar name is correct, and its not FS2CREW_RAASPRO_MASTER_SWITCH?

John

Posted
1 hour ago, John Dowson said:

But the problem is this:

Quote

while (ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH") == nil)

It seems that nil is no longer being returned when the lvar doesn't exist.

I have corrected this now in the attached version, so your script should work with this version as it is: FSUIPC7.exe

John

Posted

Hi John

I tested it and it works perfectly. I actually had a typo in the LVAR, didn't notice it, thanks for the tip. 
I have attached the log file for information.

Many thanks and

Kind regards

Ramon

 

FSUIPC7.log

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.