|
Kay Douglas
Registered User
Join date: 20 Feb 2007
Posts: 41
|
11-28-2008 08:25
list MyList;
loadMyList() { MyList = ["mycar", "myhouse", "mytree"]; }
default { on_rez(integer sp) { llResetScript(); loadMyList(); }
state_entry() { loadMyList(); llSetTimerEvent(1.0); }
...
What is the best way for loading list string, list key or ...
Thanks for your help.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-28-2008 12:59
well if the data never changes, or is default for start up....
list myList = ["item1", "item2", "item3","etc"]; //-- this is a global variable
definetly doesn't need its' own function PS calling a function on the line after a resetscript doesn't work...
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Kay Douglas
Registered User
Join date: 20 Feb 2007
Posts: 41
|
12-01-2008 13:38
Thanks for your help, list MyList = ["mycar", "myhouse", "mytree"]; default { on_rez(integer sp) { llResetScript(); } state_entry() { MyList(); llSetTimerEvent(1.0); } .... Ok thanks for your help i changed this 
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
12-01-2008 13:40
From: Kay Douglas state_entry() { MyList(); llSetTimerEvent(1.0); }
I think you also want to lose that MyList() line..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|