11
timrodz
8y

After hours of thoroughly reading code to find the error...

What you wanted:
If (something == true)
What you had:
If (something = true)

Hopefully no one ever finds that error before me!

Comments
  • 8
    So really, what you wanted was:

    if(something) {

    }
  • 2
    Our coding standard always makes the true the first element!

    If(true==something)

    This way it you type true = something you get a compile error.

    Just for future reference, I hope this helps.
  • 1
    @jslater255 Oh, the so called Yoda conditions, right? Might have to give it a try! Thanks mate 😄
Add Comment