anselm Hexicola Posted December 18, 2012 Share Posted December 18, 2012 How do you output the name of a list in Chat?If I write.. list my_list=[anything]; llOwnerSay("my list is called " +(string)my_list); that just gives me "my list is called anything" , which is not what I need.I need "my list is called my_list". Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 18, 2012 Share Posted December 18, 2012 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 More sharing options...
anselm Hexicola Posted December 18, 2012 Author Share Posted December 18, 2012 OK thanks; I should be able to do something along those lines. (I will try tomorrow when my brain is fresh...) Link to comment Share on other sites More sharing options...
Xiija Posted December 18, 2012 Share Posted December 18, 2012 or make a list of list-names, if you have a bunch of lists? Link to comment Share on other sites More sharing options...
anselm Hexicola Posted December 18, 2012 Author Share Posted December 18, 2012 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 More sharing options...
Ela Talaj Posted December 18, 2012 Share Posted December 18, 2012 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 More sharing options...
Very Keynes Posted January 3, 2013 Share Posted January 3, 2013 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 More sharing options...
Recommended Posts
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