Help with possible script bugs 
Author Message
 Help with possible script bugs

I have a world that runs fine with Cosmo 2.1, no errors according to
Chisel, but with WorldView I get two "script syntax errors" and the
animation to move the kayak doesn't work.  I'd appreciate any hints.
The world can be viewed at <www.erols.com/mmcgur/vrml/virml.htm>.  The
source code is at <www.erols.com/mmcgur/vrml/virml/virml.wrl>.

--
Mike McGurrin



Sat, 21 Jul 2001 03:00:00 GMT  
 Help with possible script bugs

Quote:

> I have a world that runs fine with Cosmo 2.1, no errors according to Chisel,
> but with WorldView I get two "script syntax errors" and the animation to move
> the kayak doesn't work.  I'd appreciate any hints.  The world can be viewed at
> <www.erols.com/mmcgur/vrml/virml.htm>.  The source code is at
> <www.erols.com/mmcgur/vrml/virml/virml.wrl>.

Put some semicolons after each javascript statement in your scripts:
 url "javascript:                  
  function kayak_position ( xIn ) {
   cam_position[0] = xIn[0] ;
   cam_position[1] = 12.0   ;
   cam_position[2] = 70     ;
  }"                   #   ^^^

Also missing one in start_kayak.

--
Chris Morley



Sun, 22 Jul 2001 03:00:00 GMT  
 Help with possible script bugs

To elaborate and make it easier for anyone volunteering help, here's the
scripts in question:

Script 1:
# Javascript to take kayak position, feed X to CableCam, but fixed Y and
Z
DEF CableScript Script {
 url "javascript:
  function kayak_position ( xIn ) {
   cam_position[0] = xIn[0]
*** WorldView claims syntax error at or near above line ***
   cam_position[1] = 12.0
   cam_position[2] = 70
  }"
 eventIn SFVec3f kayak_position
 eventOut SFVec3f cam_position

Quote:
}

Script 2:
# Diode so touch activates motion, then stays until hit again
DEF Diode Script {
 url "javascript:
  function start_kayak ( bool, eventTime ) {
   if (bool == true) {
    if (move_kayak == true) {
*** WorldView claims syntax error at or near above line ***
     move_kayak = TRUE}
   }
   else   {move_kayak = TRUE; }
  }"
 eventIn SFBool start_kayak
 eventOut SFBool move_kayak

Quote:
}

Here are the relevant ROUTE's
ROUTE touchKayak.isActive TO Diode.start_kayak
ROUTE RunPosition.value_changed TO CableScript.kayak_position

Any help would be appreciated

Quote:

> I have a world that runs fine with Cosmo 2.1, no errors according to
> Chisel, but with WorldView I get two "script syntax errors" and the
> animation to move the kayak doesn't work.  I'd appreciate any hints.
> The world can be viewed at <www.erols.com/mmcgur/vrml/virml.htm>.  The
> source code is at <www.erols.com/mmcgur/vrml/virml/virml.wrl>.

--
Mike McGurrin
Mitretek Systems

Visit our website at www.mitretek.org/its/



Sun, 22 Jul 2001 03:00:00 GMT  
 Help with possible script bugs
Many thanks!  Such a simple oversight on my part.  Interesting thing is that Cosmo
Player didn't issue any warnings, and ran it fine.
Quote:

> Put some semicolons after each javascript statement in your scripts:
>  ...
> Also missing one in start_kayak.

> --
> Chris Morley




Sun, 22 Jul 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Possible bug in script evaluating

2. Calling scripts from within scripts, is this possible?

3. HELP!: Possible bug in Topspeed ODBC?

4. Possible fix for Bug 494589 - os.path.expandvars bug

5. BUG: -help argument to wish script

6. scripting image conversions possible?

7. Is it possible to pass variables between scripts?

8. Is it possible to put procs after the main script

9. Q: Possible to terminate script in progress?

10. BUGS, BUGS, BUGS, BUGS, C4 BUGS

11. Possible Catenation Bug In J 5.0 for the NeXT

12. 2 possible bugs

 

 
Powered by phpBB® Forum Software