Sign In Register

How can we help you today?

Start a new topic
Answered

Access and modify property set of achievement

Hi,


I have attached a property set to my achievement and when the server sends a ListAchievementsResponse I want to access that property set through cloud code and modify its properties...


This is the code so far: 

var achievements = Spark.getData().achievements;

for (var i = 0; i < achievements.length; i++) 
{
    var achievement = achievements[i];
    
    //just testing
    achievement.propertySet.additionalData.myProperty = 100;
}

 In my code I set the property "myProperty" of my achievement to 100 but on the client it's the initial value 0... 


I hope anybody can help :) 


Best Answer

Hi Andre,


What would the end goal be here ? Currently you can only read properties and property sets in Cloud Code. You can't change them. If you can give us a better idea of what you are trying to achieve here we can point you in the right direction.


Regards,

Liam

1 Comment

Answer

Hi Andre,


What would the end goal be here ? Currently you can only read properties and property sets in Cloud Code. You can't change them. If you can give us a better idea of what you are trying to achieve here we can point you in the right direction.


Regards,

Liam

Login to post a comment