.CEL Scripting parameter value validation

Report bugs, bug fixes and workarounds here.
Topic author
don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

.CEL Scripting parameter value validation

Post #1by don » 18.07.2003, 22:18

Version: 1.3.1 pre-6
Subject: .CEL Scripting parameter value validation

Parameter Name: time
I just discovered that all script commands that accept the parameter named "time", allow the value to be negative. When it's set to a negative number, nothing happens (no change in the display) except to freeze the display (scene can't be moved via keyboard or mouse), and the only way to reset it is to press ESC.

The commands I found that use "time" are:
* center
* goto
* gotoloc
* gotolonglat
* others?


Parameter name: duration
In addition, script commands that accept the parameter named "duration" also accept negative values. In this case, the command is seemingly ignored, as in:

Code: Select all

  select {object "Sol/Earth"}
  center {time 3}
  wait   {duration -3}

... nothing happens (no select, no center, no wait), the display is not frozen, and the next valid command will be executed.

The commands I found that use "duration" are:
* wait
* changedistance
* print
* orbit
* rotate
* move
* others?


My suggestion
Add some min-max value validation to numeric input parameters coming from a script and let the user know when a parameter is in error (command name or script line number, parameter name, and parameter value). Maybe even tell them what the valid min-max range is?

Topic author
don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #2by don » 22.07.2003, 19:13

Have you seen this one Chris?


Return to “Bugs”