DzScript.convertToDAZScript2() is more restrictive than the runtime environment!

kabexefkabexef Posts: 76
edited October 2021 in Daz Studio Discussion

SORRY - MY FAULT!

The error does not occur with checkSyntax(), but with convertToDAZScript2().

The following code (already in DAZScript2 format) works at runtime but DzScript.convertToDAZScript2() reports an error.

var a = {	"b": 0,//	"c": 0, // results an error - corrected : "c": 0	"c": 0}function showNumericPropertySettingsPanel(fctnKbxfNumericPropertyControlBox) {	function DialogPanel(wDialog, fctnKbxfNumericPropertyControlBox) {		this.activateDynamics = function() {			try {//				function xyz(a) { results an error - corrected : var xyz = function(a) {				var xyz = function(a) {				}			} catch (err) {				debug("ERROR in line " + err.lineNumber + ": " + err);			}		}	}}

Does anyone have any idea how to prevent this without changing the code?

Post edited by kabexef on

Comments

  • OmnifluxOmniflux Posts: 377

    Is this valid DAZ Script 1? I'm fairly certain convertToDAZScript2 requires DAZ Script 1 (based off QSA instead of ECMAScript 3) as input.

  • kabexefkabexef Posts: 76

    Omniflux said:

    Is this valid DAZ Script 1? I'm fairly certain convertToDAZScript2 requires DAZ Script 1 (based off QSA instead of ECMAScript 3) as input.

    Thanks for your comment - that would at least explain the behavior. 

Sign In or Register to comment.