highscore array not working correctly

From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • i build a highscore with the tutorial with database etc..

    it looks like this;

    when i preview the layout it shows this;

    when i enter my score and click "send", it shows this;

    1.) why it shows only 5 entries? i got 20 entries in databse, when i check the url to get the scores online, it is right.

    2.) why it shows nothing at the start of the layout ?

    greetings and thanks for help

  • 1) array needs to be the right size

    2) you probably deactivate the group before it has a change to grab the data since all those events are running in same tick

  • 1.) you mean the textfields? they are enough for top 10

    2.) i tried with the Ajax on completed but it seems it dont work

    can you give me a little example sir ?

  • 1) no the initial size of the array object, you need to set its X to something greater than 5. you are probably setting values when no row exists

    2) you need to use on ajax 'on completed', then there is data to add to the array. edit: this didn't work? let's see the events with on completed.

  • 1) so you mean the data in the database? i got 20 entries, and get them with mysqli_query LIMIT 10

    2)

  • I don't know how else I can explain it, the array object called Array you have to set the X to a size that fits all your data

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i got 50(name and points) scores in my database, and 20 textfields (10 for name, 10 for points) in construct. so it has enough data. i dont get what you mean with it.

    Why does oncomplete not work ?

    why it shows only 5 ?

  • that is the data i get;

    test1|200|66|50|66|50|dedede|27|test|15|Hallo|15|test|11|lloijj|10|Fudi|10|eeeee|4|test|4|dadad|4|fmhgmh|0|kbkbj|0|rrrr|0|ooo|0|

  • You have opted to set the values in the array, the rows need to exist in the array already. You have to set the X of the array to 20 on the array object so there are 20 rows.

  • what lionz said (I guess) with pictures.

  • a picture says more then 100 words.

    thank you !

  • should a "Set Group XX Activated" repeat the group XX ?

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