question

julianscott avatar image
julianscott asked

Profile ValuesToDate in Cloudscript.

Hi,

I'm trying to access the profile ValuesToDate list in a cloudscript called from a Rule, but i appear to be getting a null or undefined value in there. Other values, like "TotalValueToDateInUSD" work fine, but not this one. Any ideas.?

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jital avatar image jital ♦ commented ·

Greetings,

Could you provide the Cloudscript you're using and your TitleID?

0 Likes 0 ·
julianscott avatar image julianscott commented ·

Hi,

The titleID is FEA2

and here is some test code.

handlers.Rule_TestProfile = function (args, context) 
{
    var profile = context.playerProfile;
    var totalAmt = profile.TotalValueToDateInUSD/100;

    log.debug(totalAmt);
    
    for(var i=0; i<profile.ValuesToDate.length; i++)
    {
        var vtd = profile.ValuesToDate[i];
        var s= "value: "+vtd.TotalValueAsDecimal;
        log.debug(s);
    }

}

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.