question

Steve [not provided] avatar image
Steve [not provided] asked

Grant multiple characters with a single API call?

Hi,

I was wondering if it's possible to grant multiple characters to a user with a single API call in cloudscript. Something along the lines of...

server.GrantCharacterToUser( {

[

PlayFabId: currentPlayerId,

CharacterName:"guy1name",

CharacterType:"guy1"],

[

PlayFabId: currentPlayerId,

CharacterName:"guy2name",

CharacterType:"guy2"],

[

PlayFabId: currentPlayerId,

CharacterName:"guy3name",

CharacterType:"guy3"]

});

Thanks!

-Steve

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

·
brendan avatar image
brendan answered

The API call doesn't take an array, so no, you would need to make three calls to add three characters. If you need a version that takes an array, I'd recommend adding that as an Idea in our Feature Requests forum, so that others can vote on it (and so give us a picture of how many of our developers need it).

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.