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 / Multi dim array

Author
Message
Pumpkin Software
AGK Developer
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location: uk
Posted: 20th Dec 2014 12:28
Hi,
Should this be a problem in agk

dim testarray[626,466,335]

It compiles/runs and works correctly on the pc with no problems, but crashes immediately on devices when broadcast. I'm using tier 1 v2.10. Is there a limit?

I can get around this so not a big problem, just curious.

Thanks
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th Dec 2014 13:40 Edited at: 20th Dec 2014 13:41
I would image the limit is the available ram on the device.
You are asking for almost 400 MB of ram to be set aside for your array. If your device doesn't have it then it isn't going to work.

626 x 466 x 335 = 97,724,860 integers

Since an integer has 4 bytes then:
97,724,860 x 4 = 390,899,440 bytes
Pumpkin Software
AGK Developer
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location: uk
Posted: 20th Dec 2014 19:28 Edited at: 20th Dec 2014 19:29
Yeah, it's a lot of ram to ask for, as I said, there's an easy workaround.
Thanks

Login to post a reply

Server time is: 2024-04-16 23:23:21
Your offset time is: 2024-04-16 23:23:21