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
dbosst
Apprentice


Joined: 15 Jun 2010
Posts: 121

PostPosted: Mon Jul 12, 2010 5:26 pm   

3.22 lists - certain strings treated automatically as numbers
 
(this is a minor bug for me at least, and I don't mind if you put it at the bottom of your list)

1)its not possible to add strings of type "0005" to a list
(strings that are like numbers but have leading zeros)

not even doing %additem or #additem with %string("0005") or %concat("0005") works, it ends up treating it as a number and removing the leading zeros

2)related, #additem adds duplicates if you do something like this:

#additem tmptmp %string(06)

hit this a few times to see it adding duplicates:
#additem tmptmp %string("06");#echo @tmptmp

I believe this is because it checks the actual "06" is a member, and finds it doesn't exist, but then it adds it incorrectly as %number(%string("06"))
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Jul 12, 2010 10:11 pm   
 
Looks like a bug in the %string command. If you just do this:

#ADDITEM list "0005"
#SHOW @list.1

then it works fine.
Reply with quote
dbosst
Apprentice


Joined: 15 Jun 2010
Posts: 121

PostPosted: Mon Jul 12, 2010 11:39 pm   
 
Not just with numbers, I think this might be a different bug:

With %additem also, unless %string is used by %additem internally:

check out this behavior:

#unvar list;#show %additem("a",list);#show %additem("a",list);#show %additem("a",list)

produces:

Variable list removed.
a
a|a
a|a|a

%additem is modifying the list variable even though it is not supposed to (at least according to manual its not supposed to)

I don't know when this behavior appeared, because I rarely ever use %additem
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Mon Jul 12, 2010 11:56 pm   
 
This is actually a new feature. When you pass %additem a variable, but do not stick a @ on it, then you are telling cmud to pass by reference, thus modifying it. If you do not want it to be modified you use %additem( item, @list), instead.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jul 13, 2010 12:47 am   
 
Hrm, some how the manual says something different now. Laughing

Thanks for the reminder to change it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jul 13, 2010 5:51 pm   
 
Keep in mind that the help files are not modified for features in a Beta version until shortly before the Public version. So the manual really only applies to the 2.37 public version and not the 3.x beta.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jul 13, 2010 10:20 pm   
 
I have been away for too long, and am forgetting all the rules. Made myself some notes to fix all the other changed functions, and readjusted %additem.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 14, 2010 5:14 pm   
 
Quote:
I have been away for too long

Yes! It's been too long! We missed you.

In any case, since I'm focused more on the TeSSH release right now, feel free to go ahead and start updating the help files for the 3.x public version. I'm still hoping for a public release within the next month or so and any help is much appreciated and speeds along the process.

Just be sure to also update the help articles over on www.tessh.com. Your Guru login will also work over there and you should have write access to the knowledge base over there already.
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