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
12
S
3
Posts: 40
Reputation: 847

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
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Wed Jul 06, 2016 6:51 am

Yeah, I just figured that out! Thanks :)
Image
B
12
S
3
Posts: 40
Reputation: 847


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, lahbach, ST314 and 22 guests