LlGetSimRating Test

From Second Life Wiki
Jump to navigation Jump to search

[LLGetSimRating]

[VERSION] 0.1

[LENGTH] 00:10

[TESTERS] 1

[OVERVIEW] This test has been designed to exercise the Sim Rating function of llRequestSimulatorData.

[SETUP] This test requires 1 Tester and rezzable land

[*]

[0010] Right-click on the ground and select "Create" from the pie menu and rez a default cube

[0020] In edit, click "more >>" if necessary and select the contents tab, and copy the following script there

[SCRIPT] llGetSimRatingtest

[0030] Upon copying the script will chat the sim names in the "sim list" field followed by their rating PG, MATURE etc

[0040] Verify that this data is correct for this sim names

[0050] Feel free to edit the script to add or change the sim names and then reset the script to get it to rechat new ratings and reverify them.

[0060] Once complete, delete the prim

[END]


[llGetSimRatingtest]

// Replace with appropriate sim names to test
list sims = ["Da Boom","Ahern"];
list ids = [];
default
{
    state_entry()
    {
        integer i;
        integer max = llGetListLength(sims);
        for (i=0;i<max;++i)
        {
            ids += llRequestSimulatorData(llList2String(sims,i),DATA_SIM_RATING);
        }        
    }

    dataserver(key id, string data)
    {
        llSay(0, llList2String(sims,llListFindList(ids,[id])) + ": " + data);
    }
}