SETVAR_ fails when using variable values that contain a space (1 Viewer)

Spinner

Potential Patron
Joined
Apr 28, 2015
SETVAR_ fails when using variable values that contain a space. Example:

initial_settings:{"varA":"a", "varB":"some text", "varC":"sometext"}

[SETVAR_varA_*varB*] Will fail (with the literal string "[SETVAR_varA_some text]" being displayed).
[SETVAR_varA_*varC*] Will work.

If you're wondering why not use SETVARBYNAME ?
The answer is that it won't do the job if you want to do this: [SETVAR_targetVar_fixedText*variableText*]
 

Macnagum

Avid Affiliate
Joined
Jan 17, 2015
SDT does not accept spaces in triggers, so [SETVAR_varA_some text] and [SETVARBYNAME_varA_some text] don't work.

SETVAR add a value to a variable, SETVARBYNAME add the value of a variable to a variable. So [SETVAR_varA_*varB*] is not egal to [SETVARBYNAME_varA_varB]. With SETVAR, the content of the variable "varB" is written in the trigger, not with SETVARBYNAME - which allows use of variables that have spaces. However it is not possible to include a variable in a variable like [SETVARBYNAME_varA_var1*var2*] - but it is clear that it would be practical...
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.