question

Jérémie Fouché avatar image
Jérémie Fouché asked

Execute Cloud Script in Prize Tables

Hello, i would like "Execute Cloud Script" in a Prize Table, i tried that and i have not errors but nothing happens i the PlayerData of the players

Help would very appreciate thank you

CloudScript
screenshot-5.png (25.4 KiB)
screenshot-6.png (8.7 KiB)
10 |1200

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

1 Answer

·
Made Wang avatar image
Made Wang answered

The parameters used in Cloud Script need to correspond one-to-one with the incoming parameters, refer to the following code.

handlers.UpdataReward_Battery = function(args){
    var updateUserDataResult=server.UpdateUserReadOnlyData({
        PlayFabId: currentPlayerId,
        Data: {
            "name": args.name,
            "age": args.age,
            "health": args.health
        }
    });
}
10 |1200

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

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.