|
Athos_lol Newbie
Joined: 20 Oct 2005 Posts: 2
|
Posted: Thu Oct 20, 2005 12:54 pm
Trigger to Compare Variable Lists |
I want to be able to compare the items I have with a complete list of 200 items
If I need to collect ItemONE through ItemTWOHUNDRED
Basically I want to be able to look in a container and see which items I am missing.
Any suggestions? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Oct 20, 2005 1:43 pm |
Since you didn't post actual mud output the best I can do is give you some pseudo code and a rough place to start.
Code: |
#TR { Your container contents start line } { Declare templist to hold CurItems}
#COND {Each line of container content } {add each to CurItems}
#COND {Done container} {#FORALL @200ItemList {#IF (%ismember( %i, @CurItems) == 0) {#SHOW %i}}}
|
This is very rough code off the top of my head, but basically you are trigger off the container... adding each item in this container to your CurItems list. Once you've built CurItems you print out every item one of the 200 item list that you don't have. If you don't need to save the original 200item list or for performance reason you can copy the original 200 item list and remove all CurItems from it and display the copy.
Code: |
#COND {Done container} {#FORALL @CurItems { %delitem (%i, @Copy200ItemList) } ; #SHOW @Copy200ItemList} |
|
|
_________________ Asati di tempari! |
|
|
|
|
|