Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Problem resizing multidimensional arrays

Author
Message
Rais
20
Years of Service
User Offline
Joined: 7th Jul 2003
Location:
Posted: 18th May 2017 15:48
Not sure what I'm doing wrong here... example code


both print statements show the correct values, but trying to access the array causes an out of bounds error. Any idea what I'm doing wrong?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 18th May 2017 16:04 Edited at: 18th May 2017 16:04
Here You go:

I Think of it like a graph where the bars are X and the length of each bar is Y
You define how many bars there are with MyVar.a.length
And you can give each bar a different length with MyVar.a[index].length

Using AGKv2 Tier1

Login to post a reply

Server time is: 2024-04-25 11:19:23
Your offset time is: 2024-04-25 11:19:23