Help with logic of checking data of server before update in the game

0 favourites
  • 1 posts
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • Good Day guys, I'm having a relatively simple difficulty, but I can not solve it myself ...

    I implemented Google play (running)

    And the PlayFab Plugin to save the data of an array in the external database .. (Working also).

    What happens, when the user enters the game, he creates an array with the data in the database and localstorage, and saves them there.

    When the user closes the game, the data is saved, (confirmed in the database).

    The problem is: When the user opens the game again, the data is zeroed, both in the game and in the database, the difficulty is probably that it is not validating the data before overwriting.

    And it ends up resetting everything, as if it did not exist, I know I have to perform a validation before overwriting, but I already tried to put this validation before and after getting the data from the server,

    and I'm not getting it right, every time I try something different besides not solve, a new bug appears xD

    Could someone please give me a help? I've never worked with external server before, only with localstorage, so I do not know how to perform this data validation before receiving them ..

    I know something is wrong, but I do not know where

    Thanks and sorry for the great text .. but I tried to be as specific as possible ..

    NOTE: This example is already from two friends who helped me, and is working on saving and receiving data from an array. I just need to validate before.

    I have already been told to make a update counter and compare .. but also I have tried, and every time I try, something stops working.

    It can not be that hard to do something so simple ...

    I'm not really getting it.

    Have tried to explain me, but without the examples I can not solve it alone.

    need help.


    Main Sheet

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)