llList2String() public method

public llList2String ( OpenSim.Region.ScriptEngine.Shared.LSL_Types.list src, int index ) : OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString
src OpenSim.Region.ScriptEngine.Shared.LSL_Types.list
index int
return OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString
示例#1
0
        // Set prim params for a sculpted prim and check results.
        public void CheckllSetPrimitiveParams(LSL_Api api, string primTest,
            LSL_Types.Vector3 primSize, int primType, string primMap, int primSculptType)
        {
            // Set the prim params.
            api.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize,
                ScriptBaseClass.PRIM_TYPE, primType, primMap, primSculptType));

            // Get params for prim to validate settings.
            LSL_Types.list primParams =
                api.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE));

            // Validate settings.
            CheckllSetPrimitiveParamsVector(primSize, api.llList2Vector(primParams, 0), primTest + " prim size");
            Assert.AreEqual(primType, api.llList2Integer(primParams, 1),
                "TestllSetPrimitiveParams " + primTest + " prim type check fail");
            Assert.AreEqual(primMap, (string)api.llList2String(primParams, 2),
                "TestllSetPrimitiveParams " + primTest + " prim map check fail");
            Assert.AreEqual(primSculptType, api.llList2Integer(primParams, 3),
                "TestllSetPrimitiveParams " + primTest + " prim type scuplt check fail");
        }