You defined gIsFlying as a single boolean value, it can contain either true or false. However, when you use it throughout your code, you indicate it's an array of booleans. It can't be both.
Also, a quick note about debugging. If you get a lot of errors, don't be overwhelmed. Just start with the first one (as it probably caused the others) and fix it, then try to recompile. Repeat until a clean compile.