The Daily Click ::. Forums ::. Klik Coding Help ::. Dynamic Array 2
 

Post Reply  Post Oekaki 
 

Posted By Message

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
7th August, 2008 at 01:22:48 -

Does anybody have any experience with this object, and in particular, in saving the contents as an MMF array file?

I can create the array ok, and save as .csv, .ini, or dynamic array.

However, when I try to save as MMF array, it just crashes the app (even if it's as simple as a single value).

As suggestions would be appreciated

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th August, 2008 at 01:32:14 -

i dont mess with the dymanic array. i stick to array and array 3d objects.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
7th August, 2008 at 01:51:17 -

unfortunately I need to be able to export MMF arrays, and I also need the flexibility to change array dimesnions etc at runtime.

 
n/a

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
7th August, 2008 at 01:56:11 -

Dimesnions. That's an awesome word. Four stars!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
7th August, 2008 at 05:34:37 -

The thing about the normal MMF array is that it doesn't seem to care if you exceed its preset dimensions... and nobody really cares if you use less of the array than its dimensions. So it's pretty dynamic already.
Is it the "Dynamic Array" object that's crashing, then?

 
Go Moon!

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
7th August, 2008 at 10:28:53 -

The MMF array is already dynamic as Fifth mentioned. You can exceed the limits you set in its properties and it just extends the array.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
7th August, 2008 at 10:37:52 -

Yes, it is the Dynamic Array which is causing the crash.

I'm slightly astounded. I just tried using points that should have been way outside the bounds of the array (normal array) and it worked fine, like you said. I may still use the dynamic array object, as it has more options for manipulating arrays, but at least it means it'll be possible to export normal arrays (with a few fastloops).

This is for my array editor project, so it was important that it could create arrays of any size. If it weren't possible to exceed the preset dimensions, it would mean having to use a huge array all the time, which would take up far too much disk space and memory (just incase you actually needed the extra array space).

I'm a little curious - what's the point of setting array dimensions at all? Are they just a relic from MMF1? Did it even matter if you exceeded them then?

Anyway, Huge thankyou Fifth

and Assault Andy

Image Edited by the Author.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
7th August, 2008 at 10:47:31 -

I'm not quite sure, I came across the array resizing in MMF 1.5, so it was still present then. I have no idea where it came from!

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th August, 2008 at 11:00:58 -

HAHAHA awhile back i tried making an array with dimensions 10,000x10,000 and a warning popped up saying "THAT ARRAY WOULD CONSUME MORE THAN 256gb OF MEMORY!" and automatically set it to 10,000x1000 lol.

so youre limited to 10,000x1000. have at it!!

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
7th August, 2008 at 11:56:11 -

I reckon that's probably *just about* sufficient

although, my computer has 1GB memory and 8GB HDD, so in practice I'll probably have to make do with a little smaller than that...

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
7th August, 2008 at 18:35:06 -

I've been looking into the array some more and I've found something else useful (to me at least).

Byte 26 in an array file is used to tell MMF whether the array is a number or text aray.

If byte 26 = 1 it's a number array
If byte 26 = 2 it's a text array

You can check this very easily using the binary extension.

This means it's easy to tell whether you need to use the "read value from..." or "read string from..." expressions when reading from any array.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click