Problems when Coding a Vex Flashlight

Hi I’m working on a class project and building a marble sorting machine.

I have been trying to code the vex flashlight using cortex platform so I can use the vex light sensor.  I would like the flash light be on for the entire time the code is running,  When  I try it coding  turnFlashlightOn I always see the red X.  Stating that it is not recognized 

Platform is cortex 2.0

It is set up as a motor and is called Flashlight using the motor port

It is not recognizing turnFlashlightOn as an action. I have it set up in motors under port 2.



Any thoughts would be helpful


Do you have the flashlight connected via a Motor Controller 29? Never used one, but my guess would be it is designed to be connected directly to the power rail of the Cortex (so the two pins at the flat side of the motor socket, not the side with the keyway) and it will be on all the time that the Cortex is powered. If you want to turn it on and off, you’d need to use a Motor Controller 29 I think.