|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: 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 |
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jun 03, 2010 5:26 pm |
Confirmed and added to bug list.
|
|
|
|
|
|