Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
xin-wonder
Newbie


Joined: 13 Jul 2008
Posts: 1

PostPosted: Sun Jul 13, 2008 8:38 am   

CMUD database records, jumbled
 
I keep making database records in CMUD (2.30), save them, then as soon as I come back to look at them they are no longer in the order I wrote them.

Is this a bug or am I doing something wrong?

The strange thing is it doesn't seem to sort the database alphabetically, it seems quite random

Any ideas?

Thanks!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Jul 13, 2008 9:55 am   
 
This is a feature. Database record variables are hashed in CMUD, like they are in most other languages, and they're sorted by their hash, which is pretty much a random order. If your script relied on the records being in a certain order, it can probably be improved so that it doesn't have to any more.

You can perhaps emulate the behaviour you want by checking the Sort checkbox for the variable.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
aduan
Newbie


Joined: 12 Jul 2008
Posts: 4

PostPosted: Wed Aug 06, 2008 8:47 pm   
 
Hmm, I have some trouble with this as well, is there any way around it?
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Aug 06, 2008 11:34 pm   
 
Yes, as Fang said, check the Sorted checkbox to sort the database record variable.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Aug 07, 2008 3:51 pm   
 
Even better would be to figure out how to get the result you want without expecting a specific order, as Fang said. What exactly do you want to do?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net