#Variable index [0] out of range [0]

1 messages · Page 1 of 1 (latest)

spice nexus
#

the error states that this line (247) is the culprit. what index would [c, page] be pointing to in the array?gml draw_text_transformed_color( char_x[c, page], char_y[c, page], char[c, page], 1.1, 1.1, 0, col_1[c, page], col_2[c, page], col_3[c, page], col_4[c, page], 1 );
and what's going on here? I see your comment, but I don't think it's achieving what you want.gml //add to the x and y coordinates based on the new info char_x[c, p] = _txt_x + _current_txt_w; char_y[c, p] = _txt_y + _txt_line*line_sep;

spice nexus
#

my apologies. I feel silly.

I didn't realize char_x[c, p] is an alternative format to char_x[c][p]. I usually use the latter format to access 2D/3D arrays. so I learned something as well.

thin temple
#

[c, p] is a much older format, and it's technically deprecated. Going forward, [c][p] is the preferred one

#

As for the out of bounds, one of your arrays isn't the same length as the others. In your exact case, they're actually all a length of 0 from the looks of it.