xoros's Recent Forum Activity

  • ItemTable.For Each itemID

    -> ItemTable.CurrentItemContent("some_key") - throws this error: "v is not defined"

  • rexrainbow

    thanks!

  • ItemTable - > LoadAll -> onLoadComplete -> ForEachItemID

  • I am getting an error "Order is not defined" when I "load all" and than do "for each itemID" on load_all complete. I tried to log the loaded results to JSON and it loads everything correctly.

  • Oh, but I thought it will create server traffic )

  • What do you think, is there any solution how to save updated values onDisconnect only? Sort of an auto save?

  • So it's ok to call it every time? It will not create server traffic?

    How does exactly onDisconnect work? It saves the value locally and the server listenes to on disconnect and than when user disconnects from firebase calls this stored value from client side?

  • Yes, I think its coming from the server and refers to the value called instantly on start of the layout. I might try C2's browser event on "going offline".

    What do you mean by another store on disconnect private variable?

    If I call on disconnect set value each time the variable changes, will something be trigger on the server each time or only when I disconnect? It's difficult to explain ))

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I modified your example in order to show what I want to achieve. If I change the variable value after I set a callback, it saves the old value on disconnect.

    https://www.dropbox.com/s/7pgqt6r0jzpap9h/set%20value%20on%20disconnect1.capx?dl=0

  • That's exactly what I am doing. But it saves old values from the dictionary on disconnect. I assume it stores the value from the dictionary on callback and does not update it.

    May be it's not even possible the way I am trying to do that.

  • Hmm, the thing I want to achieve is that it saves updated values on disconnect. And now it saves the values which were on "start of layout".

  • rexrainbow

    about disconnection event handlers: if you pass a variable value or any value that can change onDisconnect handler and after that variable changed, the old variable is saved to the database on disconnection instead of a new value. Is it possible to update the passed value on disconnection? I assume the variable value stored somewhere and not gets updated

    Example

    ->on start of layout add disconnect handler with variable value (5)

    ->change variable to 12

    -> disconnect saves 5

xoros's avatar

xoros

Member since 18 May, 2012

None one is following xoros yet!

Connect with xoros

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies