|
|
|
As an update.... The following code WILL create a new list and work correctly:
list origin =["1","2","3","4"]; default timer() { origin += ["7"]; llOwnerSay(llList2CSV(destination)); destination += ["8"]; llOwnerSay(llList2CSV(origin)); llSetTimerEvent(0); }} Passing lists to a function is done by reference as well.
listByReference(list destination) default } Quite honestly, I would rather have this functionality or atleast somehow have reference asignments in LSL, but I highly doubt this was intended.
I think this is probably the same bug...
list list_A = ["one", "two", "three"]; } The second time list_A prints, it's now "one, two, three, 1, 2, 3" instead of just "one two three." This was fixed with the value semantics update. It has passed QA so I'm marking as resolved.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list origin =["1","2","3","4"];
list destination=[];
default
{ destination = origin; llOwnerSay(llList2CSV(destination)); origin += ["5"]; llOwnerSay(llList2CSV(destination)); destination += ["6"]; llOwnerSay(llList2CSV(origin)); llSetTimerEvent(1); }{
state_entry()
timer()
{ origin += ["7"]; llOwnerSay(llList2CSV(destination)); destination += ["8"]; llOwnerSay(llList2CSV(origin)); llSetTimerEvent(0); }}
Expected Output:
[19:21] Object: 1, 2, 3, 4
[19:21] Object: 1, 2, 3, 4
[19:21] Object: 1, 2, 3, 4, 5
[19:21] Object: 1, 2, 3, 4, 6
[19:21] Object: 1, 2, 3, 4, 5, 7
Actual Output:
[19:22] Object: 1, 2, 3, 4
[19:22] Object: 1, 2, 3, 4, 5
[19:22] Object: 1, 2, 3, 4, 5, 6
[19:22] Object: 1, 2, 3, 4, 5, 6, 7
[19:22] Object: 1, 2, 3, 4, 5, 6, 7, 8