Array.at(10) doesn't work?

Get help using Construct 2

Post » Wed Jul 06, 2016 6:43 am

Hey!

I'm not so sure if I have missed something, but if I have an array, and put values into 1-11 by doing set value at 0, set value at 1, set value at 2 etc, when I later try and put the values into textboxes, the only values that work retrieving is 1-9, and 10 and 11 just displays 0 in the textbox. Does anyone know why it does that, and if it's supposed to be like that?

Thanks.
Image
B
10
S
3
Posts: 35
Reputation: 781

Post » Wed Jul 06, 2016 6:46 am

Arrays index at 0, not 1, so you can address 0-9 by default. Change the arrays Width in the properties to add more entries. The default width is 10.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Wed Jul 06, 2016 6:51 am

Yeah, I just figured that out! Thanks :)
Image
B
10
S
3
Posts: 35
Reputation: 781


Return to How do I....?

Who is online

Users browsing this forum: HenryPK and 10 guests