Building a custom flight mode errors

Hello, I am looking for help with building a custom flight mode. I have followed all of the steps on Adding a New Flight Mode and received many errors. Eventually I tried putting my flight mode inside the pre-existing flip flight mode where I was able to successfully build and upload to the Pixhawk. However, it will not switch to the flight mode and gives a flight mode change error. What are the checks ArduCopter looks for when changing flight modes? I have tried switching with it armed and motors running. I even removed everything from the initialization function to see if that helped but it still gave errors. I was able to successfully switch to the original flip mode so I know it can switch in my testing set up. (Running with the Pixhawk Cube)