Sign In Register

How can we help you today?

Start a new topic

SetScriptData not storing data in player script

i need to store my data in new player scriptData.
the data is static and store in properties fetching is working but it is not set in scriptdata.


   var uPwd = Spark.getData().password;

    var uName = Spark.getData().userName;

    var dName = Spark.getData().displayName;

        

        

    var registrationResponse = Spark.sendRequest({

        "@class": ".RegistrationRequest",

        "displayName" : dName,

        "password": uPwd,

        "segments":{},

        "userName": uName

    });

    

        var data = Spark.getProperties().getProperty("GameState");

        Spark.getPlayer().setScriptData("data ", data );

1 Comment

Its solved now. Thank You.

Login to post a comment