only getting first letter from array? [SOLVED]

  • Hi i posted this at the end of my last post but figure i should make a separate post for it.

    The problem is i have loaded data from json into an array and it all works fine all the data is there but when i call it out

    eg. if my array is 2 x 1 x 1

    [

    [First],[Second]]

    if i call the 1st one in the array

    MYARRAY.At(0)

    and set the text of a textbox to that data i only get the first letter of the data i call in this case F and not First as it should be if i call MYARRAY.At(1) i get S not Second?

    i know i have all the info in the array as if i call all the data out of the array using asJSON and send it to the textbox it prints it all out eg. [[First],[Second]]

    [SOLUTION BELOW]

    input array needed another set of [ ] around each item so

    THIS -> [[First],[Second]] -> BECOMES THIS -> [[[First]],[[Second]]]

  • 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)