New Zealand
Asked — Edited

Ok Who Changed Things While I Was Gone?

It's been a while since I had time to work with my bots and when I recently updated my software lots of things broke!

For example commands with parenthesis no longer allow for a space... Eg. Speak_("Hello) is now Speak("Hello")

Now I can fix that easily enough... but what happened here:


$Volume=$Volume-25
  if ($Volume=<5)
    $Volume=5
  endif 
SpeakVolume($Volume)

I keep getting "Missing Binary operator in Line 1

So what has changed in the last 12 or more months?

PS. I'm running the latest build of EX-Builder.


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

Canada
#1  

Welcome back Tameion, Ihad the same problem with one of my old script.

Try $volume= ($volume)-(5)

JD could explaine why it is different.

#2  

A few releases ago DJ updated the script compiler and it is now a little more rigid in following .NET standards. Biggest impact is that improper placement of spaces now fail to compile.

Alan

PRO
USA
#3  

is broken, unless @DJ's says otherwise.

  1. the code below doesn't work:

ClearVariables() 
$int1 = 30
$int1=$int1-25

Quote:

Error on line 2: Missing binary operator: 30 [?] -25

  1. the code below works (with space before the 25)

ClearVariables() 
$int1 = 30
$int1=$int1- 25

I have updated the ARC and a few scripts are broken, but i don't know since when...

PRO
USA
#4  

@tameion:

you have an error in your code (relational operator):

replace


if ($Volume=<5)

with


if ($Volume<=5)

probably before was not enforced, but the correct way is:


<=
>=

curiosity:

https://en.wikipedia.org/wiki/Relational_operator

it seems no one adopted the "=<" or "=>"

PRO
Synthiam
#5  

Update to the latest version: https://synthiam.com/Community/Questions/9274

*Note, the =< would have never worked and was never supported by ARC. The correct syntax as ptp pointed is <= or >=

Here is a copy from the EZ-Script manual which describes the comparibles:

Quote:

If (Value Condition Value ) IF condition can support multiple comparisons and functions. Condition tree must be closed with an ENDIF See the Functions section of this document. Condition can be =, <, >, <=, >=, !=, AND, OR

Examples:


If (GetDigital(D0) = 1)
  Print(One)
EndIf

If ($Day = 2 AND $Hour = 3)
  Print(Hello)
EndIf

If (GetServo(D5) &gt;20 OR ($x &gt;= 3 and $y &lt; 2))
  Print(Yup!)
EndIf