Change OCP4NGX_v4.0_OC script[SOLVED]

This is a new forum for the OC4BAv4.
Post Reply
lorenzinmarco
Posts: 7
Joined: Sun Mar 05, 2017 10:01 am

Change OCP4NGX_v4.0_OC script[SOLVED]

Post by lorenzinmarco »

Hi guys,
I'm testing OCP4NGX_v4.0_OC file on my homemade cockpit and it works great, but I think some variables are missed. I'm talking about some Wiper selectors' states. I found only PARK state in the script, but not INT, LOW and HIGH states.
They exist in the PMDG B737 SDK:

// Wipers
unsigned char OH_WiperLSelector; // 0: PARK 1: INT 2: LOW 3:HIGH
unsigned char OH_WiperRSelector; // 0: PARK 1: INT 2: LOW 3:HIGH

I find these in the "SIOC offsets for B737_VARS.txt" file:

1116 = OH_WiperLSelector);
1117 = OH_WiperRSelector);

I try to add some script rows in OCP4NGX_v4.0_OC file but it doesn't work. Below you can see what I added in the script:

Var 5555, name WIPER_L_SW_INT, Link IOCARD_SW, Device 30, Input 90 // L Wiper INT ROT
{
IF &WIPER_L_SW_INT = 1
{
&WIPER_L_C = 1
}
}

SIOC give me an error on Phase 2 when I compile the .txt file. What's wrong?
So how can I add INT - LOW - HIGH Wiper positions on OCP4NGX_v4.0_OC file?
Thank you in advance for your help.
Regards

Marco
mvr1918
Site Admin
Posts: 1709
Joined: Thu Aug 30, 2012 3:35 pm

Re: Change OCP4NGX_v4.0_OC script

Post by mvr1918 »

I just added your code to OCP4NGX_v4.0_OC.txt

and it compiled OK
lorenzinmarco
Posts: 7
Joined: Sun Mar 05, 2017 10:01 am

Re: Change OCP4NGX_v4.0_OC script

Post by lorenzinmarco »

Hi Roar,
thank you for your quick response. It's very very strange. It seems that every change I make on the .txt file generates this error (see image attached).
I try also to delete a piece of "if-else" cycle WITHOUT syntax errors. The same error appears.
I try also to change a variable name, for example "WIPER_L_SW" to "WIPER_L_SW_1" . The same error appears.
Regards

Marco
Attachments
Cattura.JPG
Cattura.JPG (32.42 KiB) Viewed 2865 times
mvr1918
Site Admin
Posts: 1709
Joined: Thu Aug 30, 2012 3:35 pm

Re: Change OCP4NGX_v4.0_OC script

Post by mvr1918 »

Are you using the latest SIOC 5.1B2 version?

To me it looks like your text editor you use put in some strange characters.

Try with Notepad.

Anyway, this is a editor or SIOC issue, not a OC4BAv4 issue.
lorenzinmarco
Posts: 7
Joined: Sun Mar 05, 2017 10:01 am

Re: Change OCP4NGX_v4.0_OC script

Post by lorenzinmarco »

Hi Roar,
I install Notepad++ and now SIOC compiles scripts without errors!!! My problem is solved.
Thank you very much Roar.
Regards

Marco
mvr1918
Site Admin
Posts: 1709
Joined: Thu Aug 30, 2012 3:35 pm

Re: Change OCP4NGX_v4.0_OC script

Post by mvr1918 »

Glad you got it working. Marks topic as SOLVED
Post Reply