March 7, 200620 yr I have always found that closing multiple IF statements prior to an els has worked, till today.This works (sort of) wherein everything after the first IF works, but the basic argument of (A:SIM ON GROUND,bool) 0 == refuses to co-operate : (A:SIM ON GROUND,bool) 0 == if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) 0 == || (L:CorrectedN1,enum) 57 <= || if{ 1 (>L:autorotate,bool) } els{ 0 (>L:autorotate,bool) } } This works with the basic argument of (A:SIM ON GROUND,bool) 0 == where is resets when sim on ground, but the statements after the if do not work: (A:SIM ON GROUND,bool) 0 == if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) 0 == || (L:CorrectedN1,enum) 57 <= || if{ 1 (>L:autorotate,bool) } } els{ 0 (>L:autorotate,bool) } So the question is, when is it required to close an IF statement, an els statement or a combination of both??Steve
March 7, 200620 yr Author ""So the question is, when is it required to close an IFstatement, an els statement or a combination of both??""XML nest structuring of "if/els" kinda follow the rules of most programming languages. Each "if{" should have its finishing "}" and the same applies for "els{"I see in the second paragraph, there is a "}" missing here:....(>L:autorotate,bool) } ...which is strange because it does exists in the first.(?)In this case, the entire portion after the first "if{" will execute as long as SIM ON GROUND is 0: (A:SIM ON GROUND,bool) 0 == if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) 0 == || (L:CorrectedN1,enum) 57 <= || if{ 1 (>L:autorotate,bool) } els{ 0 (>L:autorotate,bool) } }Or you might save the nested if/els using bool conditionals:(A:SIM ON GROUND,bool)if{ (A:general eng propeller lever position:2,percent) 80 < (A:ENG1 COMBUSTION,bool) ! || (L:CorrectedN1,enum) 57 <= || (>L:autorotate,bool) }(Note: remember "ampersand"; should be used instead of "<")Hope this helps a bit.Tom
Create an account or sign in to comment