im a little confused on the new compiler. all its changed is where the quotation marks go and has added math funtions?
The apple device thing will be awesome!
@technopro, something like that yes. It's changed the syntax so, when using Print with multiple variables or parts you must separate them with the + character. Math functions have always been part of EZ-Script. If you haven't used Print in scripts much then it probably wont make much difference to you. A quick look through all of my scripts I've written and very few require updating.
Loving this addition
Here's a simple script that speaks current location and heading
Note the smileys are really close brackets! (tips for removing them appreciated)
$alt = Round($Altitude,0)
$lat = Round($Latitude,2)
$lon = Round($Longitude,2)
$Mag = Round($MagneticHeading,0)
If ($lon < 1)
$token = "minus"
Else $token = "plus"
Say ("altitude is" + $alt + "Meters")
Say ("location is" + $lat + "latitude")
Say ($token + $lon + "longitude")
Say ("on a heading of" + $Mag + "degrees")
OK so going through some of my scripts...
It tells me the following syntax is wrong, should it be wrong? It's an easy fix for the code but a bit of a pain to fix on all scripts.
Print("C1 " + Round($cell1,2) + "V")
Also, my ifs with or
IF ($cell1 > $vmax or $cell2 > $vmax)
throws this error
28: IF ($cell1 > $vmax or $cell2 > $vmax)
> Error on line 28: Invalid token in expression: [or]
It throws the same error if I put each part in brackets too i.e.
IF (($cell1 > $vmax) or ($cell2 > $vmax))
And with and.
The example code for IF with AND and OR
IF (GetServo(D5) > 20 OR ($x >= 3 and $y < 2))
Error on line 1: Invalid token in expression: [OR (]
This throws an error
Unknown Servo Port: $sweepservo
Can I no longer set the servos ports as variables in the head of the code?
I can't check any further on this script as it was written so it would be simple for community members to use and every Servo() command uses a variable for it's port.
Am I missing something?
Check the latest version
Ports will work as variables It's not something I have liked - but I added that functionality back.
Although I will be updating my scripts to remove the port variables, it's not good practice at the end of the day. It may make it easier for the community to use the scripts but it takes away from them understanding the scripts and how they are put together. And it's mainly the battery monitor and ping roam scripts that use them, both of which are being updated so it's no biggie if you did want to take it out (I have no problems with it - it is the kick up the backside I need to get my head back in to those scripts)
Is it time to start having specific users (@Rich, @jstarne1) beta test prior to releases? It seems to me that EZ-Builder is getting complex enough that each new release breaks something that a small team of dedicated beta testers would probably identify.
Just a thought. (for a change, I am not volunteering myself. Barely have enough free time to work on production releases let alone Beta...).
I find the releases hot off the press extremely valuable. I find these breaks backwards compatibility issues to be quite rare yet easy to remedy over all. I also keep all previous downloads. Might I suggest if you find something is broke, report it of course, but uninstall that version and reinstall the versions that previously worked with your models?