Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by studio · Jul 11, 2017 at 08:46 AM · CloudScript

Cloud script execute more once

Hey,

I am not sure if this is a bug or not but, I am making a request to execute a cloudscript to gift an item to a player , but the request is happening 14 times , but I have only made the request once , I check the code and check it again , is there a way to add a validator to the script .

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Jul 11, 2017 at 08:47 AM

A script will only execute once from a call to ExecuteCloudScript, so it sounds like you have a PlayStream action set to trigger the script, which may be getting triggered by something you're doing in the script itself. What is the Title ID and the Cloud Script handler in question?

Comment

People who like this

0 Show 6 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image studio · Jul 12, 2017 at 08:55 AM 0
Share

Hey @Brendan,

The Title ID is E5C and I am calling the cloud script via unity by calling ExecuteCloudScriptRequest and passing the function 'RewardGachaPrize'.

As far as i know , the only way the cloudscript is called is via the code from the client

avatar image Brendan ♦♦ studio · Jul 12, 2017 at 08:57 AM 0
Share

I'm not seeing that in any of the accounts I check. Can you also provide a PlayFab ID for a player account that ran into this issue?

avatar image studio · Jul 12, 2017 at 09:02 AM 0
Share

The Title ID is E5C and I am calling the cloud script via unity by calling ExecuteCloudScriptRequest and passing the function 'RewardGachaPrize'.

As far as i know , the only way the cloudscript is called is via the code from the game client

avatar image Brendan ♦♦ studio · Jul 12, 2017 at 09:03 AM 0
Share

Understood, but I'm not able to find an example of that issue in any player account. Can you please provide the PlayFab ID of a player account where this issue was seen?

avatar image studio · Jul 15, 2017 at 01:17 AM 0
Share

Hi Brendan , this user id 307E035008DC703A that had the issue , on July 10th 12:59 PM he used a coin and then my code excutes a cloudscript to grant an item to the player , but instend of 1 item he got 14 items

Let me know if you need anything more @Brendan

results.png (286.0 kB)
avatar image Brendan ♦♦ studio · Jul 15, 2017 at 01:23 AM 0
Share

Looking at the details, the service only ran it once each time it was called - it's just that it was called that many times. If you're positive there's no way the client code could do that, it's likely the player just hacked the call. That's why we always recommend putting cheat checking code into your Cloud Script - the server side is the only place you can effectively prevent cheating, really. So, check min/max values, the last time something was called, etc. Right now, your RewardGachaPrize simply grants the item without taking any precautions to see if the call is legitimate.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Server API - Possible Bug: You only get Friend tags with the GetFriendList call if the parameter ProfileConstraints is null 1 Answer

    server.AddSharedGroupMember returns Invalid Shared Group ID 1 Answer

    Don't know how to send values to azure function via cloudscript with Unity 1 Answer

    Scheduled Task Not running as expected 1 Answer

    Get players in segment count Via cloud script and update title data 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges