I will try to help.

First it looks like you are missing a > at the end of <Animation

Should be <Animation>

The code you are referencing is what is called Reverse Polish Notation (yes a bad term in todays world) Short form is RPN.

This coding style (language) uses the computer stack memory. Think of a stack of plates in a kitchen cupboard. The only plate available to you to take is the one on top (yes you can cheat and grab one from the middle- but your kitchen cupboard keeps those plates protected. You can't grab those.

**(L:CanopyHandle, bool) 100 * == (A:SIM ON GROUND, Bool) == (A:ENG COMBUSTION:1,bool) ! and (A:AIRSPEED TRUE, Knots) 30 < and if{ 100 } els{ 0 }**

There ar L Var **(L:CanopyHandle, bool) **and A vars **(A:SIM ON GROUND, Bool),** **(A:ENG COMBUSTION:1,bool), (A:AIRSPEED TRUE, Knots)**

There are code functions like:

*****

==

and

!<

if{ }

els{ }

RPN reads your code line from left to right

The first thing it sees is an LVar **(L:CanopyHandle, bool)** - so this is put on the stack - At this point in time the stack (of plates) is empty and we add a plate (the Lvar)

The next value to put on the stack is **100**

The next thing is the code function *****, the multiply function. The multiply function needs two variable. It gets these variables from the stack memory. So **100 **is on top and **(L:CanopyHandle, bool) **is underneath it (remember stack of plates).

We "pop" these two values off the stack, multiply them together and put the result back on the stack.

Now a bool type is a number either zero (false) or one (true) so somewhere else you should have code that changes this LVar from 1 to 0 or 0 to 1

When a bool is multiplied by a constant (100) we have zero times 100 results in zero or we have one times 100 results in100.

Now your next term is ==, but this term is incorrect here. == is looking for two variables on the stack - you only have one at this point. The == function is a test of equality. (is A equal to B)

Your next term is **(A:SIM ON GROUND, Bool) **, this is put on the stack so now you have two variables on the stack.

The next thing is another == so we compare the **(A:SIM ON GROUND, Bool) **to the result that was placed on the stack from before. **(L:CanopyHandle, bool) 100 * == (its either a zero or 100), **but comparing a bool to 100 is not right either.

This code is just not going to work.

I assume you want to open the canopy only if the aircraft is on the ground, and if the engine is not running, and if the airspeed is less than 30 knots?

What you need to do is fill up the stack with all these variables and test them.

**(A:SIM ON GROUND, Bool) (A:ENG COMBUSTION:1,bool) ! * (A:AIRSPEED TRUE, Knots) 30 < and if{ 100 } els{ 0 }**

This puts **(A:SIM ON GROUND, Bool) - **which is zero or one (0 or 1) onto the stack

then **(A:ENG COMBUSTION:1,bool) **is put on the stack

then it is negated - turned from zero to one or from one to zero.

then you multiply these two Avars together and the result (zero or one) is put back in the stack.

then you put **(A:AIRSPEED TRUE, Knots) **on the stack

then you put **30 **on the stack - now you have three variables on the stack

STACK by position

postion 0 (top) has** 30**

postion 1 has** (A:AIRSPEED TRUE, Knots)**

postion 2 has result of **(A:SIM ON GROUND, Bool) (A:ENG COMBUSTION:1,bool) ! ***

then next in the code is **< **this takes the top two items on the stack and compares them to see if the second is less than the first - is **(A:AIRSPEED TRUE, Knots)** less than** 30 **and if true puts a one on the stack (is less than 30) or a zero on the stack if false (is greater than 30)

then the next is the **and **code function. this take the top two values and will "and" them together - A and B - if A and B are both 1 then result is 1 - if anyone of A or B is zero then result is zero

STACK by Position

postion 0 has result of **(A:AIRSPEED TRUE, Knots) 30 <**

postion 1 has result of **(A:SIM ON GROUND, Bool) (A:ENG COMBUSTION:1,bool) ! ***

It takes a lot of mind power to figure all this out. But the result of position 0 and position 1 result in one value of a zero or one.

Now the **if{} els{} **code function will do one of two things enclosed in the **{}** parts. if the result of the previous "and" in this case is 1 then the **if{}** part is done. If the previous "and" is zero then the **els{}** is done.

So depending on all these variables the result comes down to 0 or 100 as the animation code value. If 0 then the animation is at Key Frame 0 if the result is 100 then the animation Key frame is set to 100.

I have only tried to help explain how RPN works. This code may not be what you need. You will also need some mouse code to trigger the animation.