question

henagames avatar image
henagames asked

Rule - Setting default values via CloudScript not stable

Hi - I have a Rule set for "player_added_title" which kicks off a cloudscript to set default UserData values. I do not want these default values in the game code because if I had to tweak them slightly, I would need to re-release the app.

The issue is that this doesn't seem to run 100% correctly of the time. I've encountered a few instances where creating a new account runs the cloudscript, but the values are not set properly (everything gets set to 0). Have you seen this before? Is there a better way to ensure default values get set upon account creation successfully without putting them in game-code?

CloudScriptunity3d
3 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.

Sarah Zhang avatar image Sarah Zhang commented ·

Can you please provide a Title ID for this, so that we can review?

0 Likes 0 ·
henagames avatar image henagames Sarah Zhang commented ·

Sure thing: BB5C

0 Likes 0 ·
henagames avatar image henagames commented ·

Thank you for looking into it. It's pretty random, so your comment that I might be calling GetUserData too fast makes some sense, so I'll put a short delay in there per your suggestion.

I'll try to find any steps to reproduce to see if I can make this happen consistently. Thanks again!

0 Likes 0 ·

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Hi, We have checked your title. The following playerId 'BACB4AEC95A12648,4834C87F0F52FABC,AA2965EBF00757F8,BB5A7B0BF391E554,F65C5E69E8BBA165,' they seem no issues. The Data of '8CDE605E12350F56' is different too much. If there are not your playerIds that have issues in this title. Please provide them or some screenshots.

We also create a test account '9742CFBB1855123D', it performs normally too. So we wondering in what situation, will it be reproduced. Did you test your function in the postman? Or you just used it in the Game Engine?

There's one possibility that you call 'GetUserData' so fast that Player Data hasn't be set. If this is the reason. You can add a short delay before you call the 'GetUserData'.

If you still have questions, welcome to ask.

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]