|
Cris Poliak
Registered User
Join date: 14 Apr 2008
Posts: 27
|
04-15-2008 08:54
Hello I have an array inside a script like this one:
list pics = ["pic1 name", "pic2 name", "pic3 name" ]; list items = ["name of item1", "name of item2", "name of item3" ];
How can I make an adaptation of the code so I can write that list inside another script and/or notecard to make it easier (1 per line)?
pic1 name, name of item1 pic2 name, name of item2 ...
Thanks in advance.
Best Regards.
Cris.
|
|
Ravanne Sullivan
Pole Dancer Extraordinair
Join date: 10 Dec 2005
Posts: 674
|
04-15-2008 09:47
I believe this should be of help. http://lslwiki.net/lslwiki/wakka.php?wakka=llGetNotecardLineThere are also several threads with useful information, you should be able to find them with the search.
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
High level concepts...
04-15-2008 14:20
Reading notecards is event driven in LSL (like just about everything else  . When you request a line from the card, you are sending a request to the database, and you get back a request id. You can in fact make several database requests as long as you keep track of the ids. At unpredictable times in the future, a dataserver event will occur. In that event, you will get a reply to one of your requests, identified by its request id. They might not come in order, I think. Some of them might not come at all, I think. (You'd have to repeat the request.) I suppose tht some might even come twice, so you need to throw away the extra one. Such is life in a distributed application.
_____________________
So many monkeys, so little Shakespeare.
|
|
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
|
04-15-2008 18:06
S/he asked how to 'write' on a script/notecard. The answer is: you can NOT write data on a notecard. A question: why do you want to save it in another script? you have to use communiactions to do that. If scripts are in same object you can use linked messages: http://lslwiki.net/lslwiki/wakka.php?wakka=ExampleLinkMessageYou have a good example there. But if scripts are in different objects you have to use llSay.
|
|
Cris Poliak
Registered User
Join date: 14 Apr 2008
Posts: 27
|
04-16-2008 00:40
That's not what I wanted, I know that I can't place a script on a notecard. I just wanted to place in that notecard the variable values to make the configuration easier. I've found an example here: http://www.wakatech.com/articles/lsl-scripting-basics/configuring-lsl-scripts-using-a-notecard/Thanks for the help guys. 
|
|
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
|
04-16-2008 07:19
Ah, you meant "read" from a notecard, not "write". This example is clearer http://rpgstats.com/wiki/index.php?title=LlGetNotecardLine
|
|
Cris Poliak
Registered User
Join date: 14 Apr 2008
Posts: 27
|
04-16-2008 09:44
Thank you Kahiro I've tried it into my code and it works perfectly.
|