BananazGorilla's Forum Posts

  • 2 posts
  • Oh okay, I thought that "size" was the max number of values the array was allowed to hold, rather than just the starting size. Thanks for clarifying.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I was having trouble accessing the elements of my arrays correctly, and I think I found the problem.

    Say I have an array and set its size to (1,1,1), then push a 9 to the back.

    When I tell my string object to display Array.At(0) (which should be the first and only element in an array of this size), it says "0." However, when I set it to Array.At(1), it shows "9"

    When I set the array size to (0,1,1) which, according to the manual, should be illegal, the textbox shows "9" at Array.At(0), and "0" at Array.At(1), meaning that the array has a width of 1.

    So it seems like arrays always set their x-width to one higher than you specify. Am I right, or just missing something?

  • 2 posts