Vex v5 Vision sensor assistance

My team is currently trying to make code for our vision sensor. I did many different attempts at this and thought the code below would help with knowing if the sensor is actual detecting stuff or not(Especially with the else statement) Here is my code:

if(Vision.takeSnapshot(Vision__SIG_1) > 0){
Brain.Screen.print(“Test is good”);

Brain.Screen.print(“Test failed”);


Note: Before anyone says the if statement is wrong, I checked a class reference and the takeSnapshot function return the number of objects detected with the color sig

So I assume that it does not work, because you are posting it here. I would say that it does not work, although I have never seen anything like it. Vision.takeSnapShot is usually given as a command. You might say someting more like:


I’m pretty sure that the snapshot thing is just there to identify the type of signature, so that if you had two defined objects next to each other, you would be able to tell the robot which one to go for.