Got it!

Now the Code is working. With help from people from FlightXpress Forum and mycockpit.org i finally got it.

Click more to view the code.

Var 0011, name OilP2, Link FSUIPC_INOUT, Offset $0952, Length 2     // Oil Pressure Eng2
{
IF &OilP2 < 2383
{
&_Eng2_Low_pres = 1
}
ELSE
{
&_Eng2_Low_pres = 0
}
CALL &checkRAMDR
}

Var 0012, name OilP1, Link FSUIPC_IN, Offset $08BA, Length 2     // Oil Pressure Eng1
{
IF &OilP1 < 2383
{
&_Eng1_Low_pres = 1
}
ELSE
{
&_Eng1_Low_pres = 0
}
CALL &checkRAMDL
}

Var 0013, name Aircft_GND, Link FSUIPC_IN, Offset $0366, Length 2     // Ground=1 / air=0
{
CALL &checkRAMDL
CALL &checkRAMDR
}

Var 0014, name Flapsstate, Link FSUIPC_IN, Offset $0BDC, Length 4     // Flaps state 0=up
{
CALL &checkRAMDL
CALL &checkRAMDR
}

Var 0015, name checkRAMDL, Link SUBRUTINE
{
IF &Aircft_GND = 1
{
IF &OilP1 > 2380
{
&_Eng1_RAM_Door = 1
}
ELSE
{
&_Eng1_RAM_Door = 0
}
}
ELSE
{
IF &Flapsstate > 0
{
&_Eng1_RAM_Door = 1
}
ELSE
{
&_Eng1_RAM_Door = 0
}
}
}

Var 0018, name checkRAMDR, Link SUBRUTINE
{
IF &Aircft_GND = 1
{
IF &OilP2 > 2380
{
&_Eng2_RAM_Door = 1
}
ELSE
{
&_Eng2_RAM_Door = 0
}
}
ELSE
{
IF &Flapsstate > 0
{
&_Eng2_RAM_Door = 1
}
ELSE
{
&_Eng2_RAM_Door = 0
}
}
}