If statement fix?

Any idea how to fix this If statement?
So I want the program to go into the if section if there is a switchTrack->getlink5 is true and track5->getFound is False,
and the last link variable isn't equal to 2 or 8

1
2
  if ((switchTrack->getLink5() && !track5->getFound()) && (lastLink != 2 || lastLink != 8))
Last edited on
Change the last || to &&
Topic archived. No new replies allowed.