Rsan
1
I can use regular inequalities fine, such as “if 10 < 20”, but I can’t use complex inequalities like “5 < 10 < 20”.
Assets/Direction.js(9,34): BCE0051: Operator '<' cannot be used with a left hand side of type 'boolean' and a right hand side of type 'int'.
There are no booleans involved…
Help, please.
You have to break the inequality into two separate statements.
if( 5 < 10 && 10 < 20 ) {
//&& operator- returns true if both conditions are true;
There are no booleans involved…
There are, because when you do 5 < 10 < 20, the first part evaluates as a boolean, so you’re trying to do “true < 20”.