Jump to content

List problem


anselm Hexicola
 Share

You are about to reply to a thread that has been inactive for 4177 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

You can't, unless you code it directly in your script.  You'd have to do something like

if (my_flag == 0){    gUse_This_List = my_list_1;    llOwnerSay("I'm using my_list_1 now.");}else if (my_flag == 1){    gUse_This_List = my_list_2;    llOwnerSay("I'm using my_list_2 now.");}llOwnerSay("Its first element is "+llList2String(gUse_This_List,0));

 

 

Link to comment
Share on other sites

Well, I do have a "bunch of lists" as both you and Rolig guessed. (meant to reply to Xiija - no matter[edit])

I need to manage them; and that involves knowing via Chat what they are/contain, and also then using them directly.

I have only ever used lists 1 step at a time before (if that makes sense). That is, make them, use them, move on to the next...

OK you suggest a list of lists; so, I will have to keep track of my lists by making a call to llList2String ??

Link to comment
Share on other sites

I don't see how you can do it in LSL, which lacks a pointer concept.

For instance,

list listoflists = [list1, list2, list3];  is illegal.

list listoflists = ["list1", "list2", "list3"]; is worthless in respect to actual access to elemnts of lists 1,2,3

list listoflists = list1+list2+list3; would gives access to elements of each list provided their lengths are known but is enormous memory waste.

 

Link to comment
Share on other sites

  • 3 weeks later...

You may find the DBMS System I created back in 2008 useful in your application.

It allows you to do things like this:

string table = "guests";list columns = ["name", "duration"];table = dbCreate( table, columns );llSay(0, "using Table " + table);

 

The documentation is here: https://docs.google.com/document/pub?id=1VTy2MiJBfPyebKzDAbNNVcAbfIr_F9Wn8ijHVnRP_lk

and the code is in the old archived library here: https://www.google.co.za/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CDgQFjAB&url=http%3A%2F%2Fforums-archive.secondlife.com%2F54%2F4a%2F290413%2F1.html&ei=IjHlUM7FKtO7hAflj4HwBA&usg=AFQjCNEz2ULNFM62Iw9ly7LWctqONBkrQw&bvm=bv.1355534169,d.ZG4&cad=rjt

 or publicly posted and easy to read here: http://www.free-lsl-scripts.com/cgi/freescripts.plx?ID=1542

I have more up to date versions of the code that include datetime functions, key compression and matrix access, but with the demise of the old LSL Library I gave up on posting updates.

Call me in world if the base code helps and you are interested in the updates.

Cheers

V

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4177 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...