Holly Crap ! It feels like i give you a loaded Gun.... But i not explane you how to use it
I´m happy to see you read my examples but you not use it in correct form..... Your on right way.... but some parts make no sence.
****
Lets start at beginning..... WHAT Exactly do you need.... I think we realy talk about LE Flaps. (The Leading Edge Kruger Flaps on the FRONT of Wings.... NOT the Real Flaps)
In PMDG for example it´s verry easy cause we got a own offset for the LE Flaps Transit/Extended LED Annunciator..... In Standard Aircrafts we need to bild this ourself.
Here we got 2 posible Ways.....
1. We only show a logical Output. here we simply say the LE Flaps are extending while Flaps are going from 0-1 and from 5-10.
In that case we NOT show the real LE Flaps situation.... We just show a calculated situation.
The Problem here...... The LE Flaps NOT work 100% simmular....
For Example the LE Flaps start extending not same time like Main Flaps..... If you Run Flaps from 0 to 1 then Normals Flaps started but the LE Flaps are light up some seconds later.....
AND They still run a bit longer like the standard Flaps i think.... The Needle is still at 1 in Display but LE Flaps are already extending for 1-2 Seconds longer.
That Means.... We can use Offset 0BE0 BUT we not have a 100% realistic situation
( I Think thats OK for you.... But NOTE Then the Lights not work with realistic durations ! )
2 Alternate you can use Offsets 30E8, 30EA ..... I not try out myself until now but THIS should normaly show the REAL 1:1 LE Flaps situation !
This is much advanced and for a 100% Solution we need own code, too.
Finaly you need to decide youreself what you need.... Just a good "Fake" Output that looks like real or do you need a realistic situation ?
( Without malfanctions i think the first one is enough )
*****
Now about the IF Function.
Please tell us exactly WHAT you like to show !
From your posted stuff i not see exact the logic.
My Information for "B737 800NG": ( If we work with indication of Standard Flaps and NOT via the REAL LeFlaps Offsets)
LE Flaps Transit will light up, when Mainflaps are run from 0-1, 5-10 and backwards from 10-5 and 1-0
LE Flaps Extended will Light if Mainflaps are 1 or higher BUT NOT when a transit is in progress.... So it not light between 5-10 or 10-5 .
Hope you got same logic. If Yes the follow is the key.....
You need to find out the Offset Value of Flaps positions 1 , 5 and 10
I´m not on my Flightsim PC so you must look youreself..... i just use Placeholder FLAP1 FLAP5 and FLAP10 now..... Please insert the VALUE yourself instead of this text.
LE Extended : if($<
FLAP1,0,if($>
FLAP5&&$<
FLAP10,0,$))
This Means..... If Value is less then Flap1 Value its OFF .... If Value is between Flap5 and Flap 10 Value its OFF, too.... Else it´s ON
LE Transit: if($>=
FLAP1&&$<=
FLAP5,0,if($>=
FLAP10,0,$))
This Means Value is 0 at Flaps IN ... It is also 0 At Flaps1 until Flaps5 and its again 0 at Flaps 10 and bigger.... Only light now between 0-1 and 5-10 and reverse.
I Read it back 3 times.... i hope i not miss anything or type a issue..... Please try out and report experience!