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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Xanxis
Newbie


Joined: 07 Dec 2007
Posts: 6

PostPosted: Sat Dec 08, 2007 4:48 pm   

[2.16] Possible #Sort Issues
 
I'm not sure if this is a bug or a intended consequence of the changes to data records and stringlists, but sort seems to be purely cosmetic. For example, I recently made a 35 key data record with numbered keys ie 01-35 and the record automatically sorted itself from 01-29 but put 30 at position 1. This has been consistent across several similar tests. Now if you sort the list and try to reference position 1 in code, it will not give you the sorted key but rather unsorted one. So a reference to position 1 will give 30 no matter if the list is sorted or not. A minor issue in addition this is the need to reset the sort flag on every variable at the beginning of every session.

Should I consider these to be features and search for alternatives?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Dec 08, 2007 6:31 pm   
 
It definitely looks like this option isn't getting saved. I am also seeing some other weird issues with it. I would suggest for the time being going around the lack of saving on the option by using #SORT in an onLoad event.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sun Dec 09, 2007 3:08 pm   
 
How are you sorting the list? A code snippet would probably be helpful in this report. A method to reproduce the issue would be ideal.
Reply with quote
Xanxis
Newbie


Joined: 07 Dec 2007
Posts: 6

PostPosted: Sun Dec 09, 2007 5:22 pm   
 
Quote:

<class name="Testing" id="744">
<alias name="testsort" id="1519">
<value>#SORT TestSort
#SA %iskey(@TestSort, "31")</value>
</alias>
<var name="TestSort" type="Record" id="1520">01=test|02=test|03=test|04=test|05=test|06=test|07=test|08=test|09=test|10=test|11=test|12=test|13=test|14=test|15=test|16=test|17=test|18=test|19=test|20=test|21=test|22=test|23=test|24=test|25=test|26=test|27=test|28=test|29=test|30=test|31=test</var>
</class>


Using the testsort alias here to find key "31" in a sorted list produces 2.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Dec 11, 2007 6:19 pm   
 
Yes, CMUD currently doesn't save the #sort flag for variables. This has been added to the bug list.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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