[clang] Relational comparison result unused

I have received the error “[clang] Relational comparison result unused” and I don’t know how to fix it. I am trying to set up a pre-auton code that will vibrate when the battery goes lower than 75%. Thank you in advance.

  • Hailey

Hi @hailey_harder, any chance you can post the code?

yos give me a moment

void pre_auton(void) {
 if (true){
   Brain.Battery.capacity()<50;
 }
   // Initializing Robot Configuration. DO NOT REMOVE!
  vexcodeInit();

i havent fully fineshed it but this i what i have so far. the part that is giving me the error is "brain.battery.compacity()<50;

also sorry for the bad spelling

Thanks, you want the brain.battery part to be inside an if statement.

If ( brain.battery < 75 ) vibrate

2 Likes

Thank you so much, I appreciate it!