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
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Thu Jun 03, 2010 4:20 am   

[3.18b] BUG: Nested list becomes unnested after using %additem.
 
Using %additem on a variable with nested lists turns it into a regular list.

Code:
#print {Setting testvar to null}
#var testvar %null
#print {Adding item ~"1~|2~" using #additem}
#additem testvar "1|2"
#print {Printing each item}
#forall @testvar {
  #print {Item: %i}
  }
#print {Adding item ~"3~|4~" using #additem}
#additem testvar "3|4"
#print {Printing each item}
#forall @testvar {
  #print {Item: %i}
  }
#print {Adding item ~"5~" using #additem}
#additem testvar "5"
#print {Printing each item}
#forall @testvar {
  #print {Item: %i}
  }
#print {Adding item ~"6~" using ~%additem}
#var testvar %additem( "6", @testvar)
#print {Printing each item}
#forall @testvar {
  #print {Item: %i}
  }


Quote:
Setting testvar to null
"Adding item ""1"|2" using #additem
Printing each item
Item: 1|2
3|4
"Adding item ""3"|4" using #additem
Printing each item
Item: 1|2
Item: 3|4
Adding item "5" using #additem
Printing each item
Item: 1|2
Item: 3|4
Item: 5
Adding item "6" using %additem
Printing each item
Item: 1
Item: 2
Item: 3
Item: 4
Item: 5
Item: 6
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Jun 03, 2010 5:26 pm   
 
Confirmed and added to 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