I tried both examples given:
var string = variables.get(“string”).getAsString();
setString(string,“test”)
and:
var string = variables.get(“string”).getAsString();
string.setString(“test”)
none works, it doesn’t change the value of the variable string
No, your syntax seems to be quite different.
Const are for variables that can’t be changed. Var and Let are for ones that can. Let seems to be now preferable instead of var.
I’m really trying to understand here
what’s the difference between line 2 and line 3, when to use them?
what was wrong in my tries was just the declaration??
ha sorry I read your last message now.
So I just tried
let string = runtimeScene.getVariables().get(“string”);
string.setString(“success”);
and it works
so indeed it was the var/let
or maybe it was the get thing? i still don’t understand the difference between line 2 and line 3 of yours