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
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat Jun 05, 2010 8:08 pm   

[3.18d]BUG: %additem weirdness
 
Code:
#LOOP 100 {Test=%additem(@Test, "?")}
#SAY {%numitems(@Test)}


only shows 2 instead of 100. Looking at the settings editor, you'll see a solitary ? in the first slot, then the second one has 99 ?s. I'm wonder if this has to do with anything regarding the 'variable' must be created first before being counted...

Charneus
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jun 05, 2010 8:27 pm   
 
Did Zugg change the %additem() format? You have it reversed if he didn't change it.
_________________
EDIT: I didn't like my old signature
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat Jun 05, 2010 8:34 pm   
 
Haha, you're right, MattLofton. Silly me.

However...

Code:
#LOOP 100 {Test=%additem("?", @Test)}
#SAY {%numitems(@Test)}


shows only one item, and that %additem is acting just like #ADDITEM.

Thanks for pointing out the error in the first one, though.

Charneus
Reply with quote
Zugg
MASTER


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

PostPosted: Sun Jun 06, 2010 2:32 am   
 
Yep, it's acting like #ADDITEM and not allowing dups. You might check to see if #ADDITEM allows dups or not. I might have gotten them reversed. But I'll check into this.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Jun 06, 2010 3:14 am   
 
#ADDITEM correctly works.

Charneus
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