How do I Ajax, call two different phps and load into 2 arrays at once?

0 favourites
  • 3 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hello everyone!

    I´m calling two php files that show data from leaderboard shown as:

    team 4|991|0|0|0|991|team 5|881|0|0|0|881|team 1|451|88|25|20|584|

    and

    Taylor|679|400|0|0|Group2|1079|Emma Smith|330|5|1|1|Group6|337|Benjamin Price|205|0|0|0|Team A|205|James Miller|99|0|0|0|Group3|

    I have no problem reading them, parsing, puting them on an array, for each tex, set text to array_getscores.ar(tableData.At) etc. all thanks to the help with you guys. thanks!

    The thing is that I need to call them at the same tieme, and need to be updating every x seconds.

    Is it possible? Since I have one Ajax element, and I enter ajax.lastdata into the array..... they are constantly showing one ant the other in turns.

    Any tips? Thank you very much!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is not possible to have two ajax objects on the same project file, right??

  • You can write/save them to a variable or array as the data is received, and only display the results visually to the user when both are updated.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)