question

kxia156 avatar image
kxia156 asked

Store statistic into a variable

Hey guys I'm working on a game and I'm trying to get a statistic named "RankedPoints" and it's value to be passed into an int. However, after looking through documentation and such I still can't figure out how to do it. It seems all examples just show a debug statement on the console if a result is seen, but doesn't me how to actually get it into an int. Hopefully someone can help.

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

·
pfnathan avatar image
pfnathan answered
5 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.

kxia156 avatar image kxia156 commented ·

Can you give me an example code for doing this. A little confused how to implement this.

0 Likes 0 ·
kxia156 avatar image kxia156 commented ·

Right now I have a statistic already called "RankedPoints" in PlayFab. I want my game to take this value stored in this statistic and send it to my game and then I want to store that value into an int so I can display it for the user to see.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·
0 Likes 0 ·
kxia156 avatar image kxia156 pfnathan ♦ commented ·

When implementing this all I get is it saying Strength Recieved. I still am unsure how to pass the result I get into a variable. What line do I change and to what.

0 Likes 0 ·
1807605288 avatar image 1807605288 ♦ kxia156 commented ·

I have updated the guide to be a little more descriptive. Please take a look.

0 Likes 0 ·

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.