|
sabman Novice
Joined: 17 Aug 2007 Posts: 34
|
Posted: Mon Aug 27, 2007 6:28 am
[2.01] %pop not working? |
I'm pretty sure I'm using it correctly. It seems like %pop isn't working.
XML for the stuff:
Code: |
<alias name="ga" id="87">
<value>#IF (@hunting == 1) {
ih
tar = %pop(moblist)
}</value>
</alias>
|
hunting does = 1
moblist does have items.
When I tried #ECHO %pop(moblist) All I got was a black line. Anyone else? |
|
Last edited by sabman on Mon Aug 27, 2007 5:34 pm; edited 1 time in total |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Mon Aug 27, 2007 7:24 am |
Confirmed. Also, it looks like it's properly pulling off the first item, it's just not returning it correctly.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Aug 27, 2007 12:12 pm |
Related?
|
|
|
|
sabman Novice
Joined: 17 Aug 2007 Posts: 34
|
Posted: Mon Aug 27, 2007 5:37 pm |
I'd say no, based of docs.
%dups is only supposed to return a list without duplicates.
%pop is supposed to return the first value in a list and remove it.
In this case, %pop is returning nothing but removing the item, as stated.
It -could- be related if any list function that returns something and starts with % is doing it, perhaps. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Aug 27, 2007 7:13 pm |
Confirmed and added to bug list.
These issues are related in that they are all because of the optimization changes to string lists and database variables. I expected some problems like this and it will just take another version or two to get the problems solved. Thanks for reporting it. |
|
|
|
|
|