Unable to save dsa as dse

I have a dsa script that runs without errors.  I load it in the script editor then "Save encrypted script".  When I execute the new dse file I get:

 

2019-09-10 06:48:19.438 WARNING: Script Error: Line 66

2019-09-10 06:48:19.438 WARNING: SyntaxError: Parse error

2019-09-10 06:48:19.438 WARNING: Stack Trace:

<anonymous>()@C:/Program Files/DAZ 3D/DAZStudio4/scripts/support/omnifreaker/lib/omRenderThrottle3delight.dse:66

 

The provided line number does not seem to corespond to the source.  Any idea on how to debug this?

 

Also, when I open the dse in the script editor, it tells me that it was saved is a deprecated format....but I just saved it?

This is DS 4.11.0.383.

 

Thanks for any tips!

Comments

  • How are you saving to Program Files? Have you turned UAC off? What happens if you instead save to a regular folder, e.g. in Documents?

  • Richard HaseltineRichard Haseltine Posts: 100,948
    edited September 2019

    Rob says .dse files won't open in the ScriptIDE at all - I was remembering them opening to say they were encrypted, but I'd thought they could still be executed. Rob's point was that you can't do much with the .dse in the ScriptIDE, since it's encrypted - just execute it.

    Post edited by Richard Haseltine on
  • How are you saving to Program Files? Have you turned UAC off? What happens if you instead save to a regular folder, e.g. in Documents?

    I am saving to "My DAZ 3D Library" then copying...but I have also tried to execute from the "My DAZ 3D Library" location with same results. Strange as I have used this same workflow in previous version of DS.

    I do not have UAC off.  Should I?

  • Also, the same thing happens if I save on the mac...I must be missing something obvious.

  • MikeDMikeD Posts: 299

    Whats in your previous lines (let say 60-66)? Maybe you missed something like the ';' at the end of any prevous line and the script consider them to be the 66 line?

  • How are you saving to Program Files? Have you turned UAC off? What happens if you instead save to a regular folder, e.g. in Documents?

    I am saving to "My DAZ 3D Library" then copying...but I have also tried to execute from the "My DAZ 3D Library" location with same results. Strange as I have used this same workflow in previous version of DS.

    I do not have UAC off.  Should I?

    UAC off can cause issues, so you should be fine (in that respect) with it on.

  • MikeD said:

    Whats in your previous lines (let say 60-66)? Maybe you missed something like the ';' at the end of any prevous line and the script consider them to be the 66 line?

    Line 66 is in the middle of a block comment and I do not see anything obvious above.  I wish the stack trace was more helpful....

  • Parse error means it can't decode the line - missing brackets, incorrect symbol etc. Can you try removing the comment block and resaving - perhaps the comments is not being seen as a comemnt for some reason and so the interpreter is trying to treat it as code.

  • LeanaLeana Posts: 11,718
    edited September 2019

    Parse error means it can't decode the line - missing brackets, incorrect symbol etc. Can you try removing the comment block and resaving - perhaps the comments is not being seen as a comemnt for some reason and so the interpreter is trying to treat it as code.

    There might be a character it interprets as "end of comment" somewhere.

     

    Another possibility would be that it doesn't count comment lines when giving you the line number for the error, so error is actually on line "66 + number of comment lines before that"

    Post edited by Leana on
  • Yes, I did wonder if comment lines were discarded in the encryption, since they couldn't be read.

  • MikeDMikeD Posts: 299
    edited September 2019

    I tested your very nice idea (to know for my own scripts), but the encrypted script holds the comment lines...

     

    (function (){	var a = 1;	var b = 2;		/*here is a block	of comments to 	test if these lines	are count into .dse	files, or be discarded	*/		var c = a +b;		debug(c; //error line	})();

     

    It gave me the error:

     

    2019-09-19 12:47:15.952 WARNING: Script Error: Line 16
    2019-09-19 12:47:15.952 WARNING: SyntaxError: Parse error
    2019-09-19 12:47:15.952 WARNING: Stack Trace:
        <anonymous>()@Y:/Mike's Folder/Temp/Test.dse:16
    2019-09-19 12:47:15.953 Error in script execution: Y:/Mike's Folder/Temp/Test.dse

     

    in the log file. The Line 16 is the line of the error with the comment lines be countable....

     

     

    There must be something else in Omni's script......

     

    Omni did you "include" in your script any external script as a library or something? omRenderThrottle3delight.dse is your main script? When I have any included scripts in my main one, sometimes the error reference is about an included script.

    Post edited by MikeD on
Sign In or Register to comment.