LlListReplaceList Test
[LLListReplaceListTest]
[VERSION] 0.1
[LENGTH] 00:05
[TESTERS] 1
[OVERVIEW] This test has been designed to cover the basic functionality of the LSL function, llListReplaceList.
[SETUP] Tester must be in an area where building is enabled.
[*]
[0030] Right-click on the ground, then select CREATE and rez a default cube
[0040] Right-click on the Cube, then select Edit.
[0050] In the Edit Window, select the Content Tab.
[0060] In the Content Window, Click "New Script"
[0070] In the Script window, copy and paste the following script replacing any original script and then select "Save". Wait for it to compile and save, Then Close Script Window.
[SCRIPT] ListReplaceListScript
[0080] Verify "New Script" appears in the Contents List
[0090] Close the Edit Window
[0100] Touch the Prim
[0110] Verify you hear the following lines from the prim:
[0120] a,b,2,3,4
[0130] 1,2,3,a,b
[0140] a,b
[0150] 1,2,3,4,a,b
[0160] 1,a,b,4
[0170] a,b
[0180] 3,a,b
[0190] After Verifying the test is complete, Please Clean up your work area.
[END]
[ListReplaceListScript]
default { touch_start(integer total_number) { list foo = ["1", "2", "3", "4"]; list bar = ["a", "b"]; llSay(0,llList2CSV(llListReplaceList(foo,bar,0,0))); llSay(0,llList2CSV(llListReplaceList(foo,bar,-1,-1))); llSay(0,llList2CSV(llListReplaceList(foo,bar,0,-1))); llSay(0,llList2CSV(llListReplaceList(foo,bar,6,6))); llSay(0,llList2CSV(llListReplaceList(foo,bar,1,2))); llSay(0,llList2CSV(llListReplaceList(foo,bar,2,1))); llSay(0,llList2CSV(llListReplaceList(foo,bar,3,1))); } }