Jump to content

I have a ( stupid ) question ...


Zak Kozlov
 Share

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

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

Recommended Posts

Hellooo

I feel like my question is stupid

I'm scripting since a loong time and made lots of things but there is always things to learn!

I searched on all wikis and made many many different try to make a simple thing that'd make my current biiig project alot simplier to script ... But I'm not even suure if its possible to do ( starting to think that its not )

 

Its simple: I need to define a list to use .. with a string

I explain really bad so lets have a little example of exactly what i'm trying to do:

 

I have a few list and want to retrieve information in that list ... but to know which list i need to ask information .. i need to build it up in a string .. a little bit like this:

 

list HeIs1 = ["Boo","Bleh","GummyBears"];
list HeIs2 = ["Boo","Bleh","GummyBears"];
list HeIs3 = ["Boo","Bleh","GummyBears"];

string Something = "ImNumber1";

touch_start(integer total_number)
{
    PokemonsRockButPikachuIsWayOverrated(Something);

}

PokemonsRockButPikachuIsWayOverrated( string zeinfo)
{
    string the-list-to-use = "HeIs" + llGetSubString(zeinfos, 8, 8);
    llOwnerSay(llList2CSV(the-list-to-use);   
}

 

 

Seee what i'm trying to dooo?

 

I tried about everything I know .. This is my last hooope

Someone Heeelp?

Link to comment
Share on other sites

What you are trying does not work because the command expects a list.

The solution might be to use just 1 list in combination with the llList2List( list src, integer start, integer end ); command.

This only works if the length of every 'HeIs' sublist is the same.

What you do is you add all those 'HeIs' lists into one list (called HeIs) and when you want list number N you do:

 

HeIs = Heis1 + HeIs2 + HeIs3;N = llGetSubString(zeinfos, 8, 8);the-list-to use = llList2List(HeIs, (integer)N*3, ((integer)N*3) + 2);llOwnerSay(llList2CSV(the-list-to-use)); 

  

This is assuming all HeIs lists you have have a length of 3.

N starts with 0 in this case. If it starts with 1 (in the string you get that number from) then you replace N with (N-1).

I hope this helps.

 

If the seperate HeIs lists have different lengths it can also be done but it will be a little more complicated. :)

Link to comment
Share on other sites

Thanks for your answer :D

 

I never touched llList2List before ... I just did and learned things!

Unfortunatly this way would make things even more heavy than another way I found to get to the same results ( that isnt perfect ( complicated ... so heavy ... because I need to make this "manipulation" often ))

 

I was hoping for a magic trick to tell that this was to be treated as a list hehe

But if its impossible .. guess i'll have to do with the not-ideal but possible way hehe

 

Thanks!

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...