Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
|
09-16-2004 18:53
Is there a limit on how many items can be in the list before this function blargs all over you and fails to work?
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
|
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
|
09-16-2004 20:27
Well lists can only contain a max of 72 items without stacking the lists (holding a list inside of a list), but then that wouldn't randomize right anyway, so you wouldn't want to do that.
|
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
|
09-16-2004 20:38
You can only put 72 items in a list at a time. That is far different from only being able to put 72 items in a list.
Many of my lists are generated in code (ie read from a notecard, created in a for loop etc) not hard coded at the top of the script. The only time the 72 item limit applies is for hardcoded lists.
And after joining two of them together the llListRandomize should work just fine on the larger list. I used it fine on a list that simulated 3 decks - 156 entries.
_____________________
-- 010000010110110101100001001000000100111101101101011001010110011101100001 --
|
Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
|
09-16-2004 22:43
From: someone Originally posted by Ama Omega You can only put 72 items in a list at a time. That is far different from only being able to put 72 items in a list.
Many of my lists are generated in code (ie read from a notecard, created in a for loop etc) not hard coded at the top of the script. The only time the 72 item limit applies is for hardcoded lists.
And after joining two of them together the llListRandomize should work just fine on the larger list. I used it fine on a list that simulated 3 decks - 156 entries. Right that's right... I forgot that fact. LSL will only let you hard-code 72 items. I have had a list with two decks once without a problem and forgot. Thanks for reminding me Ama!
|
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
|
09-17-2004 07:18
Ah ok, thanks! That will work very well for me then!
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
|
Anthony Robertson
Registered User
Join date: 4 Jan 2005
Posts: 2
|
Stack-Heap Collision on list += [......];
01-17-2005 09:32
I'm working on a script that throws a Stack-Heap collision when I cross 100 items in the list, or so...
The list is entirely script-generated, and I'd read about the hard-coded list limit of 72. Is there a new limit of some sort?
Thanks!
|
Anthony Robertson
Registered User
Join date: 4 Jan 2005
Posts: 2
|
Scratch that - answered my own question
01-17-2005 09:53
I should have searched for the error code instead of assuming it was a list limit. My list stores silly numbers of player ID codes... eats up too much memory.
Going to rewrite it to be more memory-efficient.
Thanks to anyone who considered my plight!
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
01-17-2005 10:15
if you post your code, i'd be happy to take a look at it. HI guys, I though I would let you know. I did this experimentation. And it appears there is no longer a set hard limit for manual item limit on list decloration. Or if there is, it's rather high. default { state_entry() { list myList = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199];
llSay( 0, (string)llGetListLength ( myList ); } }
//code returns 200
|