|
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
|
01-08-2009 18:58
REMOVE(string restriction) { integer index = llListFindList(RLCC,[restriction]); if(index > -1) { RLCC = llDeleteSubList((RLCC=[])+RLCC,index,index); } }
When I call on this command its dose not want to work. It adds fine to the list but It dose not want to remove from the list. So what do you all think I did wrong?
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
01-08-2009 19:16
Likely, your list contains something that wasn't added as a string originally, and thus can't be found when you're searching for a string type.
|
|
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
|
01-08-2009 19:21
when doing a dump of the list it shows up. ADD(string restriction) { RLCC = (RLCC=[]) + RLCC + [restriction]; DUMP(); } REMOVE(string restriction) { integer index = llListFindList(RLCC,[restriction]); if(index > -1) { RLCC = llDeleteSubList((RLCC=[])+RLCC,index,index); } } else if(cmd == "mini map"  { if(minimap == 0) { minimap = 1; llOwnerSay("@minimap=n"  ; ADD("@minimap=n"  ; } else if(minimap == 1) { minimap = 0; llOwnerSay("@minimap=y"  ; REMOVE("@minimap=n"  ; } } [19:26] Stage 1/2: @minimap=n [19:26] Stage 1/2: @minimap=n
|
|
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
|
01-08-2009 22:19
I think this should work:
RLCC = llDeleteSubList(RLCC,index,index);
Also, in mono this construction to save memory is not needed:
RLCC = (RLCC=[]) + RLCC + [restriction];
just do this instead:
RLCC += [restriction];
|
|
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
|
01-08-2009 22:46
Seems to work just fine now. Thanks for the help all  )
|