Sorry this is a really simple question, but i just cant figure it. Im attempting to use nested IF statements with an OR condition inside. This is the code:
if (positionE != -1){
if (position == -1) || if (positionE < position)
position = positionE;
}
Obviously Im using the OR conditon incorrectly, please could someone point out the correct use.
This is the psuedo-code Im trying to code:
If positionE is not -1
If position is -1 or positionE is less than position
position is positionE
Try this :
if(positionE != -1 && (position == -1 || positionE < position)){
position = positionE;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With