Array.At(1) only returns first character

  • Hi all,

    I've worked with multidimensional arrays that seem to work. But now I have this problem:

    • I have a one dimensional array that is loaded from JSON. In the debugger I can see that this is filled correctly.
    • when I create a text-object and set text to Array.At(1), then only the first character is loaded in the text-object (also seen in debugger).

    I already checked that the text-object is big enough to display the text.

    Please help!

    Mark

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i couldn't open your project file the zip file is damaged or somthing.

    first the array index starts from 0 not 1 saw you are loading from 1. you might be loading the wrong position.

    i don't know maybe you stored it in 1st pos . so i don't know what data you stored in the array i couldn't answer you properly.

  • Sorry your file is not opening it says damaged

  • It's a JSON file you need to rename it.

    markvk it looks like a 2d array not 1d. Anyway it still seems to work ok (that is I do not get just the first character). However you should index a 2d array with x,y values.

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