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 / [SOLVED] array claims to be empty despite the size

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Jul 2022 14:41
I swear once a year I have to ask another dumb question about AppGameKit arrays. And forum search doesn't seem to find anything older than 2019 now.

I'm trying to set the dimension of a 2D array from within a function. When I display the array size it reports the correct length, yet when I try to access an index it tells me the array length is empty.

Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

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

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 26th Jul 2022 14:59
This post has been marked by the post author as the answer.
You need to set the length for each row


I would advise you use bucket zero as well. For me starting from1 always caused me grief

Login to post a reply

Server time is: 2024-11-21 13:25:20
Your offset time is: 2024-11-21 13:25:20