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.

Newcomers AppGameKit Corner / Declaring multi dimensional arrays

Author
Message
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 15th Aug 2016 20:49
Can someone post an example of how to declare a two dimensional array using the length property?
Let's say an example of 10 rows & 20 columns
Thanks in advance
The code below:

popups an out of bounds error
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Aug 2016 00:14
There is no array length property, at least not one we can access directly. This is how you dimension an array in AppGameKit and assign/call values from it.


"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
Recently Online
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Aug 2016 00:59 Edited at: 17th Aug 2016 01:01
AGK 2 does have an array length property. you can check AND set the array length
https://www.appgamekit.com/documentation/guides/12_array_changes.htm


@george++: try this
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Aug 2016 02:46
Stupid AppGameKit 1...

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
Recently Online
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Aug 2016 03:04
Lots of nice stuff in AGK2. Try it. I'm sure you'll like it
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Aug 2016 02:00
I'm going to eventually. I keep putting it off to buy other silly things, like a car and bills.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2024-11-21 20:56:28
Your offset time is: 2024-11-21 20:56:28