Lighter alternative to Listrootitemsincontainer() ?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am

Lighter alternative to Listrootitemsincontainer() ?

Post by xeon »

Currently, I've got in my includes, deriving from POL095, the Listrootitemsincontainer() function, which does nothing more than a foreach on the output of EnumerateItemsInContainer().

Obviously, if I got 500 items in my pack, they are 500 iterations.
There isn't a lighter alternative? I'm hoping for a POL core function, but 'till now I haven't found nothing in the docs.
But, maybe I've missed something :D
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Re: Lighter alternative to Listrootitemsincontainer() ?

Post by Austin »

If you are still using POL095... That is your only solution.
This feature was added in POL 097. If you are using POL 095, I suggest upgrading to 098 or 099 betas.

Code: Select all

09-15 Austin
       Added: ENUMERATE_ROOT_ONLY for EnumerateItemsInContainer(container, flags)
              Will cause it to only list the contents in the container passed and not
              the contents of any sub-containers.
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am

Re: Lighter alternative to Listrootitemsincontainer() ?

Post by xeon »

Thank you Austin. I'm using 096, I will definitively upgrade as soon as I can.
Post Reply