aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2015-08-19 23:14:11 +0200
committerMelanie Thielker2015-08-19 23:14:11 +0200
commit662b59af83a4bcaccb2b3b3bc679ee15f5a483ce (patch)
treebcf5a836fc2743e2187a609540bede0c12445b34 /OpenSim
parentSome unit tests are simply broken and create an API with a null m_item. (diff)
downloadopensim-SC_OLD-662b59af83a4bcaccb2b3b3bc679ee15f5a483ce.zip
opensim-SC_OLD-662b59af83a4bcaccb2b3b3bc679ee15f5a483ce.tar.gz
opensim-SC_OLD-662b59af83a4bcaccb2b3b3bc679ee15f5a483ce.tar.bz2
opensim-SC_OLD-662b59af83a4bcaccb2b3b3bc679ee15f5a483ce.tar.xz
Convert the lsl list type into a struct. EXPERIMENTAL! This may affect
the llSetPrimitiveParams family of functions adversely. Please test!
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs334
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs4
4 files changed, 172 insertions, 172 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 399c6e4..3fb3c32 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5864,8 +5864,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5864 public LSL_List llListInsertList(LSL_List dest, LSL_List src, int index) 5864 public LSL_List llListInsertList(LSL_List dest, LSL_List src, int index)
5865 { 5865 {
5866 5866
5867 LSL_List pref = null; 5867 LSL_List pref;
5868 LSL_List suff = null; 5868 LSL_List suff;
5869 5869
5870 m_host.AddScriptLPS(1); 5870 m_host.AddScriptLPS(1);
5871 5871
@@ -8002,7 +8002,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8002 8002
8003 protected void SetEntityParams(List<ISceneEntity> entities, LSL_List rules, string originFunc) 8003 protected void SetEntityParams(List<ISceneEntity> entities, LSL_List rules, string originFunc)
8004 { 8004 {
8005 LSL_List remaining = null; 8005 LSL_List remaining;
8006 uint rulesParsed = 0; 8006 uint rulesParsed = 0;
8007 8007
8008 foreach (ISceneEntity entity in entities) 8008 foreach (ISceneEntity entity in entities)
@@ -8013,7 +8013,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8013 remaining = SetAgentParams((ScenePresence)entity, rules, originFunc, ref rulesParsed); 8013 remaining = SetAgentParams((ScenePresence)entity, rules, originFunc, ref rulesParsed);
8014 } 8014 }
8015 8015
8016 while (remaining != null && remaining.Length > 2) 8016 while (remaining.Length > 2)
8017 { 8017 {
8018 int linknumber; 8018 int linknumber;
8019 try 8019 try
@@ -8202,7 +8202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8202 case ScriptBaseClass.PRIM_POSITION: 8202 case ScriptBaseClass.PRIM_POSITION:
8203 case ScriptBaseClass.PRIM_POS_LOCAL: 8203 case ScriptBaseClass.PRIM_POS_LOCAL:
8204 if (remain < 1) 8204 if (remain < 1)
8205 return null; 8205 return new LSL_List();
8206 8206
8207 try 8207 try
8208 { 8208 {
@@ -8214,7 +8214,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8214 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POSITION: arg #{1} - parameter 1 must be vector", rulesParsed, idx - idxStart - 1)); 8214 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POSITION: arg #{1} - parameter 1 must be vector", rulesParsed, idx - idxStart - 1));
8215 else 8215 else
8216 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POS_LOCAL: arg #{1} - parameter 1 must be vector", rulesParsed, idx - idxStart - 1)); 8216 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POS_LOCAL: arg #{1} - parameter 1 must be vector", rulesParsed, idx - idxStart - 1));
8217 return null; 8217 return new LSL_List();
8218 } 8218 }
8219 positionChanged = true; 8219 positionChanged = true;
8220 currentPosition = GetSetPosTarget(part, v, currentPosition); 8220 currentPosition = GetSetPosTarget(part, v, currentPosition);
@@ -8222,7 +8222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8222 break; 8222 break;
8223 case ScriptBaseClass.PRIM_SIZE: 8223 case ScriptBaseClass.PRIM_SIZE:
8224 if (remain < 1) 8224 if (remain < 1)
8225 return null; 8225 return new LSL_List();
8226 8226
8227 v=rules.GetVector3Item(idx++); 8227 v=rules.GetVector3Item(idx++);
8228 SetScale(part, v); 8228 SetScale(part, v);
@@ -8230,7 +8230,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8230 break; 8230 break;
8231 case ScriptBaseClass.PRIM_ROTATION: 8231 case ScriptBaseClass.PRIM_ROTATION:
8232 if (remain < 1) 8232 if (remain < 1)
8233 return null; 8233 return new LSL_List();
8234 LSL_Rotation q; 8234 LSL_Rotation q;
8235 try 8235 try
8236 { 8236 {
@@ -8239,7 +8239,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8239 catch(InvalidCastException) 8239 catch(InvalidCastException)
8240 { 8240 {
8241 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROTATION: arg #{1} - parameter 1 must be rotation", rulesParsed, idx - idxStart - 1)); 8241 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROTATION: arg #{1} - parameter 1 must be rotation", rulesParsed, idx - idxStart - 1));
8242 return null; 8242 return new LSL_List();
8243 } 8243 }
8244 // try to let this work as in SL... 8244 // try to let this work as in SL...
8245 if (part.ParentID == 0) 8245 if (part.ParentID == 0)
@@ -8258,7 +8258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8258 8258
8259 case ScriptBaseClass.PRIM_TYPE: 8259 case ScriptBaseClass.PRIM_TYPE:
8260 if (remain < 3) 8260 if (remain < 3)
8261 return null; 8261 return new LSL_List();
8262 8262
8263 try 8263 try
8264 { 8264 {
@@ -8267,7 +8267,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8267 catch(InvalidCastException) 8267 catch(InvalidCastException)
8268 { 8268 {
8269 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE: arg #{1} - parameter 1 must be integer", rulesParsed, idx - idxStart - 1)); 8269 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE: arg #{1} - parameter 1 must be integer", rulesParsed, idx - idxStart - 1));
8270 return null; 8270 return new LSL_List();
8271 } 8271 }
8272 8272
8273 remain = rules.Length - idx; 8273 remain = rules.Length - idx;
@@ -8285,7 +8285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8285 { 8285 {
8286 case ScriptBaseClass.PRIM_TYPE_BOX: 8286 case ScriptBaseClass.PRIM_TYPE_BOX:
8287 if (remain < 6) 8287 if (remain < 6)
8288 return null; 8288 return new LSL_List();
8289 8289
8290 try 8290 try
8291 { 8291 {
@@ -8294,7 +8294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8294 catch(InvalidCastException) 8294 catch(InvalidCastException)
8295 { 8295 {
8296 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 8296 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
8297 return null; 8297 return new LSL_List();
8298 } 8298 }
8299 try 8299 try
8300 { 8300 {
@@ -8303,7 +8303,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8303 catch(InvalidCastException) 8303 catch(InvalidCastException)
8304 { 8304 {
8305 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); 8305 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1));
8306 return null; 8306 return new LSL_List();
8307 } 8307 }
8308 try 8308 try
8309 { 8309 {
@@ -8312,7 +8312,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8312 catch(InvalidCastException) 8312 catch(InvalidCastException)
8313 { 8313 {
8314 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); 8314 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1));
8315 return null; 8315 return new LSL_List();
8316 } 8316 }
8317 try 8317 try
8318 { 8318 {
@@ -8321,7 +8321,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8321 catch(InvalidCastException) 8321 catch(InvalidCastException)
8322 { 8322 {
8323 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 5 must be vector", rulesParsed, idx - idxStart - 1)); 8323 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 5 must be vector", rulesParsed, idx - idxStart - 1));
8324 return null; 8324 return new LSL_List();
8325 } 8325 }
8326 try 8326 try
8327 { 8327 {
@@ -8330,7 +8330,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8330 catch(InvalidCastException) 8330 catch(InvalidCastException)
8331 { 8331 {
8332 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); 8332 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1));
8333 return null; 8333 return new LSL_List();
8334 } 8334 }
8335 try 8335 try
8336 { 8336 {
@@ -8339,7 +8339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8339 catch(InvalidCastException) 8339 catch(InvalidCastException)
8340 { 8340 {
8341 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); 8341 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1));
8342 return null; 8342 return new LSL_List();
8343 } 8343 }
8344 8344
8345 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 8345 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear,
@@ -8348,7 +8348,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8348 8348
8349 case ScriptBaseClass.PRIM_TYPE_CYLINDER: 8349 case ScriptBaseClass.PRIM_TYPE_CYLINDER:
8350 if (remain < 6) 8350 if (remain < 6)
8351 return null; 8351 return new LSL_List();
8352 8352
8353 try 8353 try
8354 { 8354 {
@@ -8357,7 +8357,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8357 catch(InvalidCastException) 8357 catch(InvalidCastException)
8358 { 8358 {
8359 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 8359 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
8360 return null; 8360 return new LSL_List();
8361 } 8361 }
8362 try 8362 try
8363 { 8363 {
@@ -8366,7 +8366,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8366 catch(InvalidCastException) 8366 catch(InvalidCastException)
8367 { 8367 {
8368 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); 8368 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1));
8369 return null; 8369 return new LSL_List();
8370 } 8370 }
8371 try 8371 try
8372 { 8372 {
@@ -8375,7 +8375,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8375 catch(InvalidCastException) 8375 catch(InvalidCastException)
8376 { 8376 {
8377 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8377 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8378 return null; 8378 return new LSL_List();
8379 } 8379 }
8380 try 8380 try
8381 { 8381 {
@@ -8384,7 +8384,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8384 catch(InvalidCastException) 8384 catch(InvalidCastException)
8385 { 8385 {
8386 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); 8386 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1));
8387 return null; 8387 return new LSL_List();
8388 } 8388 }
8389 try 8389 try
8390 { 8390 {
@@ -8393,7 +8393,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8393 catch(InvalidCastException) 8393 catch(InvalidCastException)
8394 { 8394 {
8395 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); 8395 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1));
8396 return null; 8396 return new LSL_List();
8397 } 8397 }
8398 try 8398 try
8399 { 8399 {
@@ -8402,7 +8402,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8402 catch(InvalidCastException) 8402 catch(InvalidCastException)
8403 { 8403 {
8404 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); 8404 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1));
8405 return null; 8405 return new LSL_List();
8406 } 8406 }
8407 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 8407 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear,
8408 (byte)ProfileShape.Circle, (byte)Extrusion.Straight); 8408 (byte)ProfileShape.Circle, (byte)Extrusion.Straight);
@@ -8410,7 +8410,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8410 8410
8411 case ScriptBaseClass.PRIM_TYPE_PRISM: 8411 case ScriptBaseClass.PRIM_TYPE_PRISM:
8412 if (remain < 6) 8412 if (remain < 6)
8413 return null; 8413 return new LSL_List();
8414 8414
8415 try 8415 try
8416 { 8416 {
@@ -8419,7 +8419,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8419 catch(InvalidCastException) 8419 catch(InvalidCastException)
8420 { 8420 {
8421 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 8421 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
8422 return null; 8422 return new LSL_List();
8423 } 8423 }
8424 try 8424 try
8425 { 8425 {
@@ -8428,7 +8428,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8428 catch(InvalidCastException) 8428 catch(InvalidCastException)
8429 { 8429 {
8430 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); 8430 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1));
8431 return null; 8431 return new LSL_List();
8432 } 8432 }
8433 try 8433 try
8434 { 8434 {
@@ -8437,7 +8437,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8437 catch(InvalidCastException) 8437 catch(InvalidCastException)
8438 { 8438 {
8439 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8439 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8440 return null; 8440 return new LSL_List();
8441 } 8441 }
8442 try 8442 try
8443 { 8443 {
@@ -8446,7 +8446,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8446 catch(InvalidCastException) 8446 catch(InvalidCastException)
8447 { 8447 {
8448 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); 8448 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1));
8449 return null; 8449 return new LSL_List();
8450 } 8450 }
8451 try 8451 try
8452 { 8452 {
@@ -8455,7 +8455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8455 catch(InvalidCastException) 8455 catch(InvalidCastException)
8456 { 8456 {
8457 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); 8457 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1));
8458 return null; 8458 return new LSL_List();
8459 } 8459 }
8460 try 8460 try
8461 { 8461 {
@@ -8464,7 +8464,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8464 catch(InvalidCastException) 8464 catch(InvalidCastException)
8465 { 8465 {
8466 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); 8466 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1));
8467 return null; 8467 return new LSL_List();
8468 } 8468 }
8469 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 8469 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear,
8470 (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Straight); 8470 (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Straight);
@@ -8472,7 +8472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8472 8472
8473 case ScriptBaseClass.PRIM_TYPE_SPHERE: 8473 case ScriptBaseClass.PRIM_TYPE_SPHERE:
8474 if (remain < 5) 8474 if (remain < 5)
8475 return null; 8475 return new LSL_List();
8476 8476
8477 try 8477 try
8478 { 8478 {
@@ -8481,7 +8481,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8481 catch(InvalidCastException) 8481 catch(InvalidCastException)
8482 { 8482 {
8483 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 8483 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
8484 return null; 8484 return new LSL_List();
8485 } 8485 }
8486 try 8486 try
8487 { 8487 {
@@ -8490,7 +8490,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8490 catch(InvalidCastException) 8490 catch(InvalidCastException)
8491 { 8491 {
8492 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); 8492 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1));
8493 return null; 8493 return new LSL_List();
8494 } 8494 }
8495 try 8495 try
8496 { 8496 {
@@ -8499,7 +8499,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8499 catch(InvalidCastException) 8499 catch(InvalidCastException)
8500 { 8500 {
8501 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8501 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8502 return null; 8502 return new LSL_List();
8503 } 8503 }
8504 try 8504 try
8505 { 8505 {
@@ -8508,7 +8508,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8508 catch(InvalidCastException) 8508 catch(InvalidCastException)
8509 { 8509 {
8510 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); 8510 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1));
8511 return null; 8511 return new LSL_List();
8512 } 8512 }
8513 try 8513 try
8514 { 8514 {
@@ -8517,7 +8517,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8517 catch(InvalidCastException) 8517 catch(InvalidCastException)
8518 { 8518 {
8519 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); 8519 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1));
8520 return null; 8520 return new LSL_List();
8521 } 8521 }
8522 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, 8522 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b,
8523 (byte)ProfileShape.HalfCircle, (byte)Extrusion.Curve1); 8523 (byte)ProfileShape.HalfCircle, (byte)Extrusion.Curve1);
@@ -8525,7 +8525,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8525 8525
8526 case ScriptBaseClass.PRIM_TYPE_TORUS: 8526 case ScriptBaseClass.PRIM_TYPE_TORUS:
8527 if (remain < 11) 8527 if (remain < 11)
8528 return null; 8528 return new LSL_List();
8529 8529
8530 try 8530 try
8531 { 8531 {
@@ -8534,7 +8534,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8534 catch(InvalidCastException) 8534 catch(InvalidCastException)
8535 { 8535 {
8536 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 8536 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
8537 return null; 8537 return new LSL_List();
8538 } 8538 }
8539 try 8539 try
8540 { 8540 {
@@ -8543,7 +8543,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8543 catch(InvalidCastException) 8543 catch(InvalidCastException)
8544 { 8544 {
8545 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); 8545 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1));
8546 return null; 8546 return new LSL_List();
8547 } 8547 }
8548 try 8548 try
8549 { 8549 {
@@ -8552,7 +8552,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8552 catch(InvalidCastException) 8552 catch(InvalidCastException)
8553 { 8553 {
8554 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8554 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8555 return null; 8555 return new LSL_List();
8556 } 8556 }
8557 try 8557 try
8558 { 8558 {
@@ -8561,7 +8561,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8561 catch(InvalidCastException) 8561 catch(InvalidCastException)
8562 { 8562 {
8563 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); 8563 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1));
8564 return null; 8564 return new LSL_List();
8565 } 8565 }
8566 try 8566 try
8567 { 8567 {
@@ -8570,7 +8570,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8570 catch(InvalidCastException) 8570 catch(InvalidCastException)
8571 { 8571 {
8572 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); 8572 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1));
8573 return null; 8573 return new LSL_List();
8574 } 8574 }
8575 try 8575 try
8576 { 8576 {
@@ -8579,7 +8579,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8579 catch(InvalidCastException) 8579 catch(InvalidCastException)
8580 { 8580 {
8581 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); 8581 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1));
8582 return null; 8582 return new LSL_List();
8583 } 8583 }
8584 try 8584 try
8585 { 8585 {
@@ -8588,7 +8588,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8588 catch(InvalidCastException) 8588 catch(InvalidCastException)
8589 { 8589 {
8590 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1)); 8590 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1));
8591 return null; 8591 return new LSL_List();
8592 } 8592 }
8593 try 8593 try
8594 { 8594 {
@@ -8597,7 +8597,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8597 catch(InvalidCastException) 8597 catch(InvalidCastException)
8598 { 8598 {
8599 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1)); 8599 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1));
8600 return null; 8600 return new LSL_List();
8601 } 8601 }
8602 try 8602 try
8603 { 8603 {
@@ -8606,7 +8606,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8606 catch(InvalidCastException) 8606 catch(InvalidCastException)
8607 { 8607 {
8608 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1)); 8608 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1));
8609 return null; 8609 return new LSL_List();
8610 } 8610 }
8611 try 8611 try
8612 { 8612 {
@@ -8615,7 +8615,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8615 catch(InvalidCastException) 8615 catch(InvalidCastException)
8616 { 8616 {
8617 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1)); 8617 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1));
8618 return null; 8618 return new LSL_List();
8619 } 8619 }
8620 try 8620 try
8621 { 8621 {
@@ -8624,7 +8624,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8624 catch(InvalidCastException) 8624 catch(InvalidCastException)
8625 { 8625 {
8626 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 13 must be vector", rulesParsed, idx - idxStart - 1)); 8626 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 13 must be vector", rulesParsed, idx - idxStart - 1));
8627 return null; 8627 return new LSL_List();
8628 } 8628 }
8629 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, 8629 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
8630 revolutions, radiusoffset, skew, (byte)ProfileShape.Circle, (byte)Extrusion.Curve1); 8630 revolutions, radiusoffset, skew, (byte)ProfileShape.Circle, (byte)Extrusion.Curve1);
@@ -8632,7 +8632,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8632 8632
8633 case ScriptBaseClass.PRIM_TYPE_TUBE: 8633 case ScriptBaseClass.PRIM_TYPE_TUBE:
8634 if (remain < 11) 8634 if (remain < 11)
8635 return null; 8635 return new LSL_List();
8636 8636
8637 try 8637 try
8638 { 8638 {
@@ -8641,7 +8641,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8641 catch(InvalidCastException) 8641 catch(InvalidCastException)
8642 { 8642 {
8643 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 8643 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
8644 return null; 8644 return new LSL_List();
8645 } 8645 }
8646 try 8646 try
8647 { 8647 {
@@ -8650,7 +8650,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8650 catch(InvalidCastException) 8650 catch(InvalidCastException)
8651 { 8651 {
8652 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); 8652 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1));
8653 return null; 8653 return new LSL_List();
8654 } 8654 }
8655 try 8655 try
8656 { 8656 {
@@ -8659,7 +8659,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8659 catch(InvalidCastException) 8659 catch(InvalidCastException)
8660 { 8660 {
8661 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8661 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8662 return null; 8662 return new LSL_List();
8663 } 8663 }
8664 try 8664 try
8665 { 8665 {
@@ -8668,7 +8668,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8668 catch(InvalidCastException) 8668 catch(InvalidCastException)
8669 { 8669 {
8670 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); 8670 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1));
8671 return null; 8671 return new LSL_List();
8672 } 8672 }
8673 try 8673 try
8674 { 8674 {
@@ -8677,7 +8677,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8677 catch(InvalidCastException) 8677 catch(InvalidCastException)
8678 { 8678 {
8679 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); 8679 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1));
8680 return null; 8680 return new LSL_List();
8681 } 8681 }
8682 try 8682 try
8683 { 8683 {
@@ -8686,7 +8686,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8686 catch(InvalidCastException) 8686 catch(InvalidCastException)
8687 { 8687 {
8688 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); 8688 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1));
8689 return null; 8689 return new LSL_List();
8690 } 8690 }
8691 try 8691 try
8692 { 8692 {
@@ -8695,7 +8695,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8695 catch(InvalidCastException) 8695 catch(InvalidCastException)
8696 { 8696 {
8697 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1)); 8697 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1));
8698 return null; 8698 return new LSL_List();
8699 } 8699 }
8700 try 8700 try
8701 { 8701 {
@@ -8704,7 +8704,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8704 catch(InvalidCastException) 8704 catch(InvalidCastException)
8705 { 8705 {
8706 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1)); 8706 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1));
8707 return null; 8707 return new LSL_List();
8708 } 8708 }
8709 try 8709 try
8710 { 8710 {
@@ -8713,7 +8713,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8713 catch(InvalidCastException) 8713 catch(InvalidCastException)
8714 { 8714 {
8715 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1)); 8715 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1));
8716 return null; 8716 return new LSL_List();
8717 } 8717 }
8718 try 8718 try
8719 { 8719 {
@@ -8722,7 +8722,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8722 catch(InvalidCastException) 8722 catch(InvalidCastException)
8723 { 8723 {
8724 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1)); 8724 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1));
8725 return null; 8725 return new LSL_List();
8726 } 8726 }
8727 try 8727 try
8728 { 8728 {
@@ -8731,7 +8731,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8731 catch(InvalidCastException) 8731 catch(InvalidCastException)
8732 { 8732 {
8733 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 13 must be float", rulesParsed, idx - idxStart - 1)); 8733 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 13 must be float", rulesParsed, idx - idxStart - 1));
8734 return null; 8734 return new LSL_List();
8735 } 8735 }
8736 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, 8736 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
8737 revolutions, radiusoffset, skew, (byte)ProfileShape.Square, (byte)Extrusion.Curve1); 8737 revolutions, radiusoffset, skew, (byte)ProfileShape.Square, (byte)Extrusion.Curve1);
@@ -8739,7 +8739,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8739 8739
8740 case ScriptBaseClass.PRIM_TYPE_RING: 8740 case ScriptBaseClass.PRIM_TYPE_RING:
8741 if (remain < 11) 8741 if (remain < 11)
8742 return null; 8742 return new LSL_List();
8743 8743
8744 try 8744 try
8745 { 8745 {
@@ -8748,7 +8748,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8748 catch(InvalidCastException) 8748 catch(InvalidCastException)
8749 { 8749 {
8750 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 8750 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
8751 return null; 8751 return new LSL_List();
8752 } 8752 }
8753 try 8753 try
8754 { 8754 {
@@ -8757,7 +8757,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8757 catch(InvalidCastException) 8757 catch(InvalidCastException)
8758 { 8758 {
8759 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); 8759 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1));
8760 return null; 8760 return new LSL_List();
8761 } 8761 }
8762 try 8762 try
8763 { 8763 {
@@ -8766,7 +8766,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8766 catch(InvalidCastException) 8766 catch(InvalidCastException)
8767 { 8767 {
8768 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8768 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8769 return null; 8769 return new LSL_List();
8770 } 8770 }
8771 try 8771 try
8772 { 8772 {
@@ -8775,7 +8775,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8775 catch(InvalidCastException) 8775 catch(InvalidCastException)
8776 { 8776 {
8777 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); 8777 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1));
8778 return null; 8778 return new LSL_List();
8779 } 8779 }
8780 try 8780 try
8781 { 8781 {
@@ -8784,7 +8784,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8784 catch(InvalidCastException) 8784 catch(InvalidCastException)
8785 { 8785 {
8786 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); 8786 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1));
8787 return null; 8787 return new LSL_List();
8788 } 8788 }
8789 try 8789 try
8790 { 8790 {
@@ -8793,7 +8793,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8793 catch(InvalidCastException) 8793 catch(InvalidCastException)
8794 { 8794 {
8795 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); 8795 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1));
8796 return null; 8796 return new LSL_List();
8797 } 8797 }
8798 try 8798 try
8799 { 8799 {
@@ -8802,7 +8802,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8802 catch(InvalidCastException) 8802 catch(InvalidCastException)
8803 { 8803 {
8804 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1)); 8804 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1));
8805 return null; 8805 return new LSL_List();
8806 } 8806 }
8807 try 8807 try
8808 { 8808 {
@@ -8811,7 +8811,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8811 catch(InvalidCastException) 8811 catch(InvalidCastException)
8812 { 8812 {
8813 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1)); 8813 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1));
8814 return null; 8814 return new LSL_List();
8815 } 8815 }
8816 try 8816 try
8817 { 8817 {
@@ -8820,7 +8820,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8820 catch(InvalidCastException) 8820 catch(InvalidCastException)
8821 { 8821 {
8822 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1)); 8822 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1));
8823 return null; 8823 return new LSL_List();
8824 } 8824 }
8825 try 8825 try
8826 { 8826 {
@@ -8829,7 +8829,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8829 catch(InvalidCastException) 8829 catch(InvalidCastException)
8830 { 8830 {
8831 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1)); 8831 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1));
8832 return null; 8832 return new LSL_List();
8833 } 8833 }
8834 try 8834 try
8835 { 8835 {
@@ -8838,7 +8838,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8838 catch(InvalidCastException) 8838 catch(InvalidCastException)
8839 { 8839 {
8840 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 13 must be float", rulesParsed, idx - idxStart - 1)); 8840 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 13 must be float", rulesParsed, idx - idxStart - 1));
8841 return null; 8841 return new LSL_List();
8842 } 8842 }
8843 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, 8843 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
8844 revolutions, radiusoffset, skew, (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Curve1); 8844 revolutions, radiusoffset, skew, (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Curve1);
@@ -8846,7 +8846,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8846 8846
8847 case ScriptBaseClass.PRIM_TYPE_SCULPT: 8847 case ScriptBaseClass.PRIM_TYPE_SCULPT:
8848 if (remain < 2) 8848 if (remain < 2)
8849 return null; 8849 return new LSL_List();
8850 8850
8851 string map = rules.Data[idx++].ToString(); 8851 string map = rules.Data[idx++].ToString();
8852 try 8852 try
@@ -8856,7 +8856,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8856 catch(InvalidCastException) 8856 catch(InvalidCastException)
8857 { 8857 {
8858 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SCULPT: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1)); 8858 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SCULPT: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1));
8859 return null; 8859 return new LSL_List();
8860 } 8860 }
8861 SetPrimitiveShapeParams(part, map, face, (byte)Extrusion.Curve1); 8861 SetPrimitiveShapeParams(part, map, face, (byte)Extrusion.Curve1);
8862 break; 8862 break;
@@ -8866,7 +8866,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8866 8866
8867 case ScriptBaseClass.PRIM_TEXTURE: 8867 case ScriptBaseClass.PRIM_TEXTURE:
8868 if (remain < 5) 8868 if (remain < 5)
8869 return null; 8869 return new LSL_List();
8870 8870
8871 face=(int)rules.GetLSLIntegerItem(idx++); 8871 face=(int)rules.GetLSLIntegerItem(idx++);
8872 string tex; 8872 string tex;
@@ -8882,7 +8882,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8882 catch(InvalidCastException) 8882 catch(InvalidCastException)
8883 { 8883 {
8884 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); 8884 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1));
8885 return null; 8885 return new LSL_List();
8886 } 8886 }
8887 try 8887 try
8888 { 8888 {
@@ -8891,7 +8891,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8891 catch(InvalidCastException) 8891 catch(InvalidCastException)
8892 { 8892 {
8893 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); 8893 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1));
8894 return null; 8894 return new LSL_List();
8895 } 8895 }
8896 try 8896 try
8897 { 8897 {
@@ -8900,7 +8900,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8900 catch(InvalidCastException) 8900 catch(InvalidCastException)
8901 { 8901 {
8902 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8902 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8903 return null; 8903 return new LSL_List();
8904 } 8904 }
8905 8905
8906 SetTexture(part, tex, face); 8906 SetTexture(part, tex, face);
@@ -8912,7 +8912,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8912 8912
8913 case ScriptBaseClass.PRIM_COLOR: 8913 case ScriptBaseClass.PRIM_COLOR:
8914 if (remain < 3) 8914 if (remain < 3)
8915 return null; 8915 return new LSL_List();
8916 8916
8917 LSL_Vector color; 8917 LSL_Vector color;
8918 double alpha; 8918 double alpha;
@@ -8924,7 +8924,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8924 catch(InvalidCastException) 8924 catch(InvalidCastException)
8925 { 8925 {
8926 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 8926 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
8927 return null; 8927 return new LSL_List();
8928 } 8928 }
8929 try 8929 try
8930 { 8930 {
@@ -8933,7 +8933,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8933 catch(InvalidCastException) 8933 catch(InvalidCastException)
8934 { 8934 {
8935 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); 8935 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1));
8936 return null; 8936 return new LSL_List();
8937 } 8937 }
8938 try 8938 try
8939 { 8939 {
@@ -8942,7 +8942,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8942 catch(InvalidCastException) 8942 catch(InvalidCastException)
8943 { 8943 {
8944 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); 8944 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1));
8945 return null; 8945 return new LSL_List();
8946 } 8946 }
8947 8947
8948 part.SetFaceColorAlpha(face, color, alpha); 8948 part.SetFaceColorAlpha(face, color, alpha);
@@ -8951,7 +8951,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8951 8951
8952 case ScriptBaseClass.PRIM_FLEXIBLE: 8952 case ScriptBaseClass.PRIM_FLEXIBLE:
8953 if (remain < 7) 8953 if (remain < 7)
8954 return null; 8954 return new LSL_List();
8955 bool flexi; 8955 bool flexi;
8956 int softness; 8956 int softness;
8957 float gravity; 8957 float gravity;
@@ -8967,7 +8967,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8967 catch(InvalidCastException) 8967 catch(InvalidCastException)
8968 { 8968 {
8969 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 8969 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
8970 return null; 8970 return new LSL_List();
8971 } 8971 }
8972 try 8972 try
8973 { 8973 {
@@ -8976,7 +8976,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8976 catch(InvalidCastException) 8976 catch(InvalidCastException)
8977 { 8977 {
8978 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 8978 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
8979 return null; 8979 return new LSL_List();
8980 } 8980 }
8981 try 8981 try
8982 { 8982 {
@@ -8985,7 +8985,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8985 catch(InvalidCastException) 8985 catch(InvalidCastException)
8986 { 8986 {
8987 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); 8987 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1));
8988 return null; 8988 return new LSL_List();
8989 } 8989 }
8990 try 8990 try
8991 { 8991 {
@@ -8994,7 +8994,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8994 catch(InvalidCastException) 8994 catch(InvalidCastException)
8995 { 8995 {
8996 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 8996 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
8997 return null; 8997 return new LSL_List();
8998 } 8998 }
8999 try 8999 try
9000 { 9000 {
@@ -9003,7 +9003,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9003 catch(InvalidCastException) 9003 catch(InvalidCastException)
9004 { 9004 {
9005 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 6 must be float", rulesParsed, idx - idxStart - 1)); 9005 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 6 must be float", rulesParsed, idx - idxStart - 1));
9006 return null; 9006 return new LSL_List();
9007 } 9007 }
9008 try 9008 try
9009 { 9009 {
@@ -9012,7 +9012,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9012 catch(InvalidCastException) 9012 catch(InvalidCastException)
9013 { 9013 {
9014 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 7 must be float", rulesParsed, idx - idxStart - 1)); 9014 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 7 must be float", rulesParsed, idx - idxStart - 1));
9015 return null; 9015 return new LSL_List();
9016 } 9016 }
9017 try 9017 try
9018 { 9018 {
@@ -9021,7 +9021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9021 catch(InvalidCastException) 9021 catch(InvalidCastException)
9022 { 9022 {
9023 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); 9023 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1));
9024 return null; 9024 return new LSL_List();
9025 } 9025 }
9026 9026
9027 SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force); 9027 SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force);
@@ -9030,7 +9030,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9030 9030
9031 case ScriptBaseClass.PRIM_POINT_LIGHT: 9031 case ScriptBaseClass.PRIM_POINT_LIGHT:
9032 if (remain < 5) 9032 if (remain < 5)
9033 return null; 9033 return new LSL_List();
9034 bool light; 9034 bool light;
9035 LSL_Vector lightcolor; 9035 LSL_Vector lightcolor;
9036 float intensity; 9036 float intensity;
@@ -9044,7 +9044,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9044 catch(InvalidCastException) 9044 catch(InvalidCastException)
9045 { 9045 {
9046 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 9046 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
9047 return null; 9047 return new LSL_List();
9048 } 9048 }
9049 try 9049 try
9050 { 9050 {
@@ -9053,7 +9053,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9053 catch(InvalidCastException) 9053 catch(InvalidCastException)
9054 { 9054 {
9055 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); 9055 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1));
9056 return null; 9056 return new LSL_List();
9057 } 9057 }
9058 try 9058 try
9059 { 9059 {
@@ -9062,7 +9062,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9062 catch(InvalidCastException) 9062 catch(InvalidCastException)
9063 { 9063 {
9064 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); 9064 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1));
9065 return null; 9065 return new LSL_List();
9066 } 9066 }
9067 try 9067 try
9068 { 9068 {
@@ -9071,7 +9071,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9071 catch(InvalidCastException) 9071 catch(InvalidCastException)
9072 { 9072 {
9073 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); 9073 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1));
9074 return null; 9074 return new LSL_List();
9075 } 9075 }
9076 try 9076 try
9077 { 9077 {
@@ -9080,7 +9080,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9080 catch(InvalidCastException) 9080 catch(InvalidCastException)
9081 { 9081 {
9082 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 6 must be float", rulesParsed, idx - idxStart - 1)); 9082 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 6 must be float", rulesParsed, idx - idxStart - 1));
9083 return null; 9083 return new LSL_List();
9084 } 9084 }
9085 9085
9086 SetPointLight(part, light, lightcolor, intensity, radius, falloff); 9086 SetPointLight(part, light, lightcolor, intensity, radius, falloff);
@@ -9089,7 +9089,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9089 9089
9090 case ScriptBaseClass.PRIM_GLOW: 9090 case ScriptBaseClass.PRIM_GLOW:
9091 if (remain < 2) 9091 if (remain < 2)
9092 return null; 9092 return new LSL_List();
9093 9093
9094 float glow; 9094 float glow;
9095 9095
@@ -9100,7 +9100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9100 catch(InvalidCastException) 9100 catch(InvalidCastException)
9101 { 9101 {
9102 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_GLOW: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 9102 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_GLOW: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
9103 return null; 9103 return new LSL_List();
9104 } 9104 }
9105 try 9105 try
9106 { 9106 {
@@ -9109,7 +9109,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9109 catch(InvalidCastException) 9109 catch(InvalidCastException)
9110 { 9110 {
9111 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_GLOW: arg #{1} - parameter 3 must be float", rulesParsed, idx - idxStart - 1)); 9111 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_GLOW: arg #{1} - parameter 3 must be float", rulesParsed, idx - idxStart - 1));
9112 return null; 9112 return new LSL_List();
9113 } 9113 }
9114 9114
9115 SetGlow(part, face, glow); 9115 SetGlow(part, face, glow);
@@ -9118,7 +9118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9118 9118
9119 case ScriptBaseClass.PRIM_BUMP_SHINY: 9119 case ScriptBaseClass.PRIM_BUMP_SHINY:
9120 if (remain < 3) 9120 if (remain < 3)
9121 return null; 9121 return new LSL_List();
9122 9122
9123 int shiny; 9123 int shiny;
9124 Bumpiness bump; 9124 Bumpiness bump;
@@ -9130,7 +9130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9130 catch(InvalidCastException) 9130 catch(InvalidCastException)
9131 { 9131 {
9132 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 9132 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
9133 return null; 9133 return new LSL_List();
9134 } 9134 }
9135 try 9135 try
9136 { 9136 {
@@ -9139,7 +9139,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9139 catch(InvalidCastException) 9139 catch(InvalidCastException)
9140 { 9140 {
9141 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 9141 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
9142 return null; 9142 return new LSL_List();
9143 } 9143 }
9144 try 9144 try
9145 { 9145 {
@@ -9148,7 +9148,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9148 catch(InvalidCastException) 9148 catch(InvalidCastException)
9149 { 9149 {
9150 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1)); 9150 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1));
9151 return null; 9151 return new LSL_List();
9152 } 9152 }
9153 9153
9154 SetShiny(part, face, shiny, bump); 9154 SetShiny(part, face, shiny, bump);
@@ -9157,7 +9157,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9157 9157
9158 case ScriptBaseClass.PRIM_FULLBRIGHT: 9158 case ScriptBaseClass.PRIM_FULLBRIGHT:
9159 if (remain < 2) 9159 if (remain < 2)
9160 return null; 9160 return new LSL_List();
9161 bool st; 9161 bool st;
9162 9162
9163 try 9163 try
@@ -9167,7 +9167,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9167 catch(InvalidCastException) 9167 catch(InvalidCastException)
9168 { 9168 {
9169 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FULLBRIGHT: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 9169 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FULLBRIGHT: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
9170 return null; 9170 return new LSL_List();
9171 } 9171 }
9172 try 9172 try
9173 { 9173 {
@@ -9176,14 +9176,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9176 catch(InvalidCastException) 9176 catch(InvalidCastException)
9177 { 9177 {
9178 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FULLBRIGHT: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1)); 9178 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FULLBRIGHT: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1));
9179 return null; 9179 return new LSL_List();
9180 } 9180 }
9181 SetFullBright(part, face , st); 9181 SetFullBright(part, face , st);
9182 break; 9182 break;
9183 9183
9184 case ScriptBaseClass.PRIM_MATERIAL: 9184 case ScriptBaseClass.PRIM_MATERIAL:
9185 if (remain < 1) 9185 if (remain < 1)
9186 return null; 9186 return new LSL_List();
9187 int mat; 9187 int mat;
9188 9188
9189 try 9189 try
@@ -9193,17 +9193,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9193 catch(InvalidCastException) 9193 catch(InvalidCastException)
9194 { 9194 {
9195 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_MATERIAL: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 9195 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_MATERIAL: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
9196 return null; 9196 return new LSL_List();
9197 } 9197 }
9198 if (mat < 0 || mat > 7) 9198 if (mat < 0 || mat > 7)
9199 return null; 9199 return new LSL_List();
9200 9200
9201 part.Material = Convert.ToByte(mat); 9201 part.Material = Convert.ToByte(mat);
9202 break; 9202 break;
9203 9203
9204 case ScriptBaseClass.PRIM_PHANTOM: 9204 case ScriptBaseClass.PRIM_PHANTOM:
9205 if (remain < 1) 9205 if (remain < 1)
9206 return null; 9206 return new LSL_List();
9207 9207
9208 string ph = rules.Data[idx++].ToString(); 9208 string ph = rules.Data[idx++].ToString();
9209 part.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1")); 9209 part.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1"));
@@ -9212,14 +9212,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9212 9212
9213 case ScriptBaseClass.PRIM_PHYSICS: 9213 case ScriptBaseClass.PRIM_PHYSICS:
9214 if (remain < 1) 9214 if (remain < 1)
9215 return null; 9215 return new LSL_List();
9216 string phy = rules.Data[idx++].ToString(); 9216 string phy = rules.Data[idx++].ToString();
9217 part.ScriptSetPhysicsStatus(phy.Equals("1")); 9217 part.ScriptSetPhysicsStatus(phy.Equals("1"));
9218 break; 9218 break;
9219 9219
9220 case ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE: 9220 case ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE:
9221 if (remain < 1) 9221 if (remain < 1)
9222 return null; 9222 return new LSL_List();
9223 9223
9224 int shape_type; 9224 int shape_type;
9225 9225
@@ -9230,7 +9230,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9230 catch(InvalidCastException) 9230 catch(InvalidCastException)
9231 { 9231 {
9232 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_PHYSICS_SHAPE_TYPE: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 9232 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_PHYSICS_SHAPE_TYPE: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
9233 return null; 9233 return new LSL_List();
9234 } 9234 }
9235 9235
9236 ExtraPhysicsData physdata = new ExtraPhysicsData(); 9236 ExtraPhysicsData physdata = new ExtraPhysicsData();
@@ -9245,7 +9245,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9245 9245
9246 case ScriptBaseClass.PRIM_TEMP_ON_REZ: 9246 case ScriptBaseClass.PRIM_TEMP_ON_REZ:
9247 if (remain < 1) 9247 if (remain < 1)
9248 return null; 9248 return new LSL_List();
9249 string temp = rules.Data[idx++].ToString(); 9249 string temp = rules.Data[idx++].ToString();
9250 9250
9251 part.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1")); 9251 part.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1"));
@@ -9254,7 +9254,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9254 9254
9255 case ScriptBaseClass.PRIM_TEXGEN: 9255 case ScriptBaseClass.PRIM_TEXGEN:
9256 if (remain < 2) 9256 if (remain < 2)
9257 return null; 9257 return new LSL_List();
9258 //face,type 9258 //face,type
9259 int style; 9259 int style;
9260 9260
@@ -9265,7 +9265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9265 catch(InvalidCastException) 9265 catch(InvalidCastException)
9266 { 9266 {
9267 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXGEN: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); 9267 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXGEN: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1));
9268 return null; 9268 return new LSL_List();
9269 } 9269 }
9270 try 9270 try
9271 { 9271 {
@@ -9274,13 +9274,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9274 catch(InvalidCastException) 9274 catch(InvalidCastException)
9275 { 9275 {
9276 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXGEN: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); 9276 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXGEN: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1));
9277 return null; 9277 return new LSL_List();
9278 } 9278 }
9279 SetTexGen(part, face, style); 9279 SetTexGen(part, face, style);
9280 break; 9280 break;
9281 case ScriptBaseClass.PRIM_TEXT: 9281 case ScriptBaseClass.PRIM_TEXT:
9282 if (remain < 3) 9282 if (remain < 3)
9283 return null; 9283 return new LSL_List();
9284 string primText; 9284 string primText;
9285 LSL_Vector primTextColor; 9285 LSL_Vector primTextColor;
9286 LSL_Float primTextAlpha; 9286 LSL_Float primTextAlpha;
@@ -9292,7 +9292,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9292 catch(InvalidCastException) 9292 catch(InvalidCastException)
9293 { 9293 {
9294 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1)); 9294 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1));
9295 return null; 9295 return new LSL_List();
9296 } 9296 }
9297 try 9297 try
9298 { 9298 {
@@ -9301,7 +9301,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9301 catch(InvalidCastException) 9301 catch(InvalidCastException)
9302 { 9302 {
9303 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); 9303 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1));
9304 return null; 9304 return new LSL_List();
9305 } 9305 }
9306 try 9306 try
9307 { 9307 {
@@ -9310,7 +9310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9310 catch(InvalidCastException) 9310 catch(InvalidCastException)
9311 { 9311 {
9312 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); 9312 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1));
9313 return null; 9313 return new LSL_List();
9314 } 9314 }
9315 Vector3 av3 = Util.Clip(primTextColor, 0.0f, 1.0f); 9315 Vector3 av3 = Util.Clip(primTextColor, 0.0f, 1.0f);
9316 part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f)); 9316 part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f));
@@ -9319,7 +9319,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9319 9319
9320 case ScriptBaseClass.PRIM_NAME: 9320 case ScriptBaseClass.PRIM_NAME:
9321 if (remain < 1) 9321 if (remain < 1)
9322 return null; 9322 return new LSL_List();
9323 try 9323 try
9324 { 9324 {
9325 string primName = rules.GetLSLStringItem(idx++); 9325 string primName = rules.GetLSLStringItem(idx++);
@@ -9328,12 +9328,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9328 catch(InvalidCastException) 9328 catch(InvalidCastException)
9329 { 9329 {
9330 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_NAME: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1)); 9330 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_NAME: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1));
9331 return null; 9331 return new LSL_List();
9332 } 9332 }
9333 break; 9333 break;
9334 case ScriptBaseClass.PRIM_DESC: 9334 case ScriptBaseClass.PRIM_DESC:
9335 if (remain < 1) 9335 if (remain < 1)
9336 return null; 9336 return new LSL_List();
9337 try 9337 try
9338 { 9338 {
9339 string primDesc = rules.GetLSLStringItem(idx++); 9339 string primDesc = rules.GetLSLStringItem(idx++);
@@ -9342,12 +9342,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9342 catch(InvalidCastException) 9342 catch(InvalidCastException)
9343 { 9343 {
9344 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_DESC: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1)); 9344 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_DESC: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1));
9345 return null; 9345 return new LSL_List();
9346 } 9346 }
9347 break; 9347 break;
9348 case ScriptBaseClass.PRIM_ROT_LOCAL: 9348 case ScriptBaseClass.PRIM_ROT_LOCAL:
9349 if (remain < 1) 9349 if (remain < 1)
9350 return null; 9350 return new LSL_List();
9351 LSL_Rotation rot; 9351 LSL_Rotation rot;
9352 try 9352 try
9353 { 9353 {
@@ -9356,14 +9356,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9356 catch(InvalidCastException) 9356 catch(InvalidCastException)
9357 { 9357 {
9358 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROT_LOCAL: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1)); 9358 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROT_LOCAL: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1));
9359 return null; 9359 return new LSL_List();
9360 } 9360 }
9361 SetRot(part, rot); 9361 SetRot(part, rot);
9362 break; 9362 break;
9363 9363
9364 case ScriptBaseClass.PRIM_OMEGA: 9364 case ScriptBaseClass.PRIM_OMEGA:
9365 if (remain < 3) 9365 if (remain < 3)
9366 return null; 9366 return new LSL_List();
9367 LSL_Vector axis; 9367 LSL_Vector axis;
9368 LSL_Float spinrate; 9368 LSL_Float spinrate;
9369 LSL_Float gain; 9369 LSL_Float gain;
@@ -9375,7 +9375,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9375 catch(InvalidCastException) 9375 catch(InvalidCastException)
9376 { 9376 {
9377 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1)); 9377 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1));
9378 return null; 9378 return new LSL_List();
9379 } 9379 }
9380 try 9380 try
9381 { 9381 {
@@ -9384,7 +9384,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9384 catch(InvalidCastException) 9384 catch(InvalidCastException)
9385 { 9385 {
9386 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 3 must be float", rulesParsed, idx - idxStart - 1)); 9386 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 3 must be float", rulesParsed, idx - idxStart - 1));
9387 return null; 9387 return new LSL_List();
9388 } 9388 }
9389 try 9389 try
9390 { 9390 {
@@ -9393,14 +9393,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9393 catch(InvalidCastException) 9393 catch(InvalidCastException)
9394 { 9394 {
9395 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); 9395 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1));
9396 return null; 9396 return new LSL_List();
9397 } 9397 }
9398 TargetOmega(part, axis, (double)spinrate, (double)gain); 9398 TargetOmega(part, axis, (double)spinrate, (double)gain);
9399 break; 9399 break;
9400 9400
9401 case ScriptBaseClass.PRIM_SLICE: 9401 case ScriptBaseClass.PRIM_SLICE:
9402 if (remain < 1) 9402 if (remain < 1)
9403 return null; 9403 return new LSL_List();
9404 LSL_Vector slice; 9404 LSL_Vector slice;
9405 try 9405 try
9406 { 9406 {
@@ -9409,20 +9409,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9409 catch(InvalidCastException) 9409 catch(InvalidCastException)
9410 { 9410 {
9411 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_SLICE: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1)); 9411 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_SLICE: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1));
9412 return null; 9412 return new LSL_List();
9413 } 9413 }
9414 part.UpdateSlice((float)slice.x, (float)slice.y); 9414 part.UpdateSlice((float)slice.x, (float)slice.y);
9415 break; 9415 break;
9416 9416
9417 case ScriptBaseClass.PRIM_LINK_TARGET: 9417 case ScriptBaseClass.PRIM_LINK_TARGET:
9418 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. 9418 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless.
9419 return null; 9419 return new LSL_List();
9420 9420
9421 return rules.GetSublist(idx, -1); 9421 return rules.GetSublist(idx, -1);
9422 9422
9423 default: 9423 default:
9424 Error(originFunc, string.Format("Error running rule #{0}: arg #{1} - unsupported parameter", rulesParsed, idx - idxStart)); 9424 Error(originFunc, string.Format("Error running rule #{0}: arg #{1} - unsupported parameter", rulesParsed, idx - idxStart));
9425 return null; 9425 return new LSL_List();
9426 } 9426 }
9427 } 9427 }
9428 } 9428 }
@@ -9449,7 +9449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9449 } 9449 }
9450 } 9450 }
9451 9451
9452 return null; 9452 return new LSL_List();
9453 } 9453 }
9454 9454
9455 protected LSL_List SetAgentParams(ScenePresence sp, LSL_List rules, string originFunc, ref uint rulesParsed) 9455 protected LSL_List SetAgentParams(ScenePresence sp, LSL_List rules, string originFunc, ref uint rulesParsed)
@@ -9472,7 +9472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9472 case ScriptBaseClass.PRIM_POSITION: 9472 case ScriptBaseClass.PRIM_POSITION:
9473 case ScriptBaseClass.PRIM_POS_LOCAL: 9473 case ScriptBaseClass.PRIM_POS_LOCAL:
9474 if (remain < 1) 9474 if (remain < 1)
9475 return null; 9475 return new LSL_List();
9476 9476
9477 try 9477 try
9478 { 9478 {
@@ -9488,13 +9488,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9488 { 9488 {
9489 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POS_LOCAL: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1)); 9489 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POS_LOCAL: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1));
9490 } 9490 }
9491 return null; 9491 return new LSL_List();
9492 } 9492 }
9493 break; 9493 break;
9494 9494
9495 case ScriptBaseClass.PRIM_ROTATION: 9495 case ScriptBaseClass.PRIM_ROTATION:
9496 if (remain < 1) 9496 if (remain < 1)
9497 return null; 9497 return new LSL_List();
9498 9498
9499 Quaternion inRot; 9499 Quaternion inRot;
9500 9500
@@ -9505,7 +9505,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9505 catch(InvalidCastException) 9505 catch(InvalidCastException)
9506 { 9506 {
9507 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROTATION: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1)); 9507 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROTATION: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1));
9508 return null; 9508 return new LSL_List();
9509 } 9509 }
9510 9510
9511 SceneObjectPart parentPart = sp.ParentPart; 9511 SceneObjectPart parentPart = sp.ParentPart;
@@ -9517,7 +9517,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9517 9517
9518 case ScriptBaseClass.PRIM_ROT_LOCAL: 9518 case ScriptBaseClass.PRIM_ROT_LOCAL:
9519 if (remain < 1) 9519 if (remain < 1)
9520 return null; 9520 return new LSL_List();
9521 9521
9522 try 9522 try
9523 { 9523 {
@@ -9526,29 +9526,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9526 catch(InvalidCastException) 9526 catch(InvalidCastException)
9527 { 9527 {
9528 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROT_LOCAL: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1)); 9528 Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROT_LOCAL: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1));
9529 return null; 9529 return new LSL_List();
9530 } 9530 }
9531 9531
9532 break; 9532 break;
9533 9533
9534 case ScriptBaseClass.PRIM_TYPE: 9534 case ScriptBaseClass.PRIM_TYPE:
9535 Error(originFunc, "PRIM_TYPE disallowed on agent"); 9535 Error(originFunc, "PRIM_TYPE disallowed on agent");
9536 return null; 9536 return new LSL_List();
9537 9537
9538 case ScriptBaseClass.PRIM_OMEGA: 9538 case ScriptBaseClass.PRIM_OMEGA:
9539 Error(originFunc, "PRIM_OMEGA disallowed on agent"); 9539 Error(originFunc, "PRIM_OMEGA disallowed on agent");
9540 return null; 9540 return new LSL_List();
9541 9541
9542 case ScriptBaseClass.PRIM_LINK_TARGET: 9542 case ScriptBaseClass.PRIM_LINK_TARGET:
9543 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. 9543 if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless.
9544 return null; 9544 return new LSL_List();
9545 9545
9546 return rules.GetSublist(idx, -1); 9546 return rules.GetSublist(idx, -1);
9547 9547
9548 default: 9548 default:
9549 Error(originFunc, 9549 Error(originFunc,
9550 string.Format("Error running rule #{0} on agent: arg #{1} - disallowed on agent", rulesParsed, idx - idxStart)); 9550 string.Format("Error running rule #{0} on agent: arg #{1} - disallowed on agent", rulesParsed, idx - idxStart));
9551 return null; 9551 return new LSL_List();
9552 } 9552 }
9553 } 9553 }
9554 } 9554 }
@@ -9559,7 +9559,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9559 string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message); 9559 string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message);
9560 } 9560 }
9561 9561
9562 return null; 9562 return new LSL_List();
9563 } 9563 }
9564 9564
9565 public LSL_String llStringToBase64(string str) 9565 public LSL_String llStringToBase64(string str)
@@ -10169,7 +10169,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10169 public LSL_List GetEntityParams(ISceneEntity entity, LSL_List rules) 10169 public LSL_List GetEntityParams(ISceneEntity entity, LSL_List rules)
10170 { 10170 {
10171 LSL_List result = new LSL_List(); 10171 LSL_List result = new LSL_List();
10172 LSL_List remaining = null; 10172 LSL_List remaining;
10173 10173
10174 while (true) 10174 while (true)
10175 { 10175 {
@@ -10270,7 +10270,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10270 10270
10271 case (int)ScriptBaseClass.PRIM_TEXTURE: 10271 case (int)ScriptBaseClass.PRIM_TEXTURE:
10272 if (remain < 1) 10272 if (remain < 1)
10273 return null; 10273 return new LSL_List();
10274 10274
10275 int face = (int)rules.GetLSLIntegerItem(idx++); 10275 int face = (int)rules.GetLSLIntegerItem(idx++);
10276 if (face > 21) 10276 if (face > 21)
@@ -10284,7 +10284,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10284 10284
10285 case (int)ScriptBaseClass.PRIM_COLOR: 10285 case (int)ScriptBaseClass.PRIM_COLOR:
10286 if (remain < 1) 10286 if (remain < 1)
10287 return null; 10287 return new LSL_List();
10288 10288
10289 face = (int)rules.GetLSLIntegerItem(idx++); 10289 face = (int)rules.GetLSLIntegerItem(idx++);
10290 if (face > 21) 10290 if (face > 21)
@@ -10296,7 +10296,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10296 10296
10297 case (int)ScriptBaseClass.PRIM_BUMP_SHINY: 10297 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
10298 if (remain < 1) 10298 if (remain < 1)
10299 return null; 10299 return new LSL_List();
10300 10300
10301 face = (int)rules.GetLSLIntegerItem(idx++); 10301 face = (int)rules.GetLSLIntegerItem(idx++);
10302 if (face > 21) 10302 if (face > 21)
@@ -10308,7 +10308,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10308 10308
10309 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 10309 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
10310 if (remain < 1) 10310 if (remain < 1)
10311 return null; 10311 return new LSL_List();
10312 10312
10313 face = (int)rules.GetLSLIntegerItem(idx++); 10313 face = (int)rules.GetLSLIntegerItem(idx++);
10314 if (face > 21) 10314 if (face > 21)
@@ -10329,7 +10329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10329 10329
10330 case (int)ScriptBaseClass.PRIM_TEXGEN: 10330 case (int)ScriptBaseClass.PRIM_TEXGEN:
10331 if (remain < 1) 10331 if (remain < 1)
10332 return null; 10332 return new LSL_List();
10333 10333
10334 face = (int)rules.GetLSLIntegerItem(idx++); 10334 face = (int)rules.GetLSLIntegerItem(idx++);
10335 if (face > 21) 10335 if (face > 21)
@@ -10346,7 +10346,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10346 10346
10347 case (int)ScriptBaseClass.PRIM_GLOW: 10347 case (int)ScriptBaseClass.PRIM_GLOW:
10348 if (remain < 1) 10348 if (remain < 1)
10349 return null; 10349 return new LSL_List();
10350 10350
10351 face = (int)rules.GetLSLIntegerItem(idx++); 10351 face = (int)rules.GetLSLIntegerItem(idx++);
10352 if (face > 21) 10352 if (face > 21)
@@ -10375,13 +10375,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10375 10375
10376 case (int)ScriptBaseClass.PRIM_LINK_TARGET: 10376 case (int)ScriptBaseClass.PRIM_LINK_TARGET:
10377 if(remain < 3) 10377 if(remain < 3)
10378 return null; 10378 return new LSL_List();
10379 10379
10380 return rules.GetSublist(idx, -1); 10380 return rules.GetSublist(idx, -1);
10381 } 10381 }
10382 } 10382 }
10383 10383
10384 return null; 10384 return new LSL_List();
10385 } 10385 }
10386 10386
10387 public LSL_List GetPrimParams(SceneObjectPart part, LSL_List rules, ref LSL_List res) 10387 public LSL_List GetPrimParams(SceneObjectPart part, LSL_List rules, ref LSL_List res)
@@ -10535,7 +10535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10535 10535
10536 case (int)ScriptBaseClass.PRIM_TEXTURE: 10536 case (int)ScriptBaseClass.PRIM_TEXTURE:
10537 if (remain < 1) 10537 if (remain < 1)
10538 return null; 10538 return new LSL_List();
10539 10539
10540 int face = (int)rules.GetLSLIntegerItem(idx++); 10540 int face = (int)rules.GetLSLIntegerItem(idx++);
10541 Primitive.TextureEntry tex = part.Shape.Textures; 10541 Primitive.TextureEntry tex = part.Shape.Textures;
@@ -10575,7 +10575,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10575 10575
10576 case (int)ScriptBaseClass.PRIM_COLOR: 10576 case (int)ScriptBaseClass.PRIM_COLOR:
10577 if (remain < 1) 10577 if (remain < 1)
10578 return null; 10578 return new LSL_List();
10579 10579
10580 face=(int)rules.GetLSLIntegerItem(idx++); 10580 face=(int)rules.GetLSLIntegerItem(idx++);
10581 10581
@@ -10604,7 +10604,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10604 10604
10605 case (int)ScriptBaseClass.PRIM_BUMP_SHINY: 10605 case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
10606 if (remain < 1) 10606 if (remain < 1)
10607 return null; 10607 return new LSL_List();
10608 10608
10609 face=(int)rules.GetLSLIntegerItem(idx++); 10609 face=(int)rules.GetLSLIntegerItem(idx++);
10610 10610
@@ -10635,7 +10635,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10635 10635
10636 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 10636 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
10637 if (remain < 1) 10637 if (remain < 1)
10638 return null; 10638 return new LSL_List();
10639 10639
10640 face = (int)rules.GetLSLIntegerItem(idx++); 10640 face = (int)rules.GetLSLIntegerItem(idx++);
10641 10641
@@ -10677,7 +10677,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10677 10677
10678 case (int)ScriptBaseClass.PRIM_TEXGEN: 10678 case (int)ScriptBaseClass.PRIM_TEXGEN:
10679 if (remain < 1) 10679 if (remain < 1)
10680 return null; 10680 return new LSL_List();
10681 10681
10682 face=(int)rules.GetLSLIntegerItem(idx++); 10682 face=(int)rules.GetLSLIntegerItem(idx++);
10683 10683
@@ -10718,7 +10718,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10718 10718
10719 case (int)ScriptBaseClass.PRIM_GLOW: 10719 case (int)ScriptBaseClass.PRIM_GLOW:
10720 if (remain < 1) 10720 if (remain < 1)
10721 return null; 10721 return new LSL_List();
10722 10722
10723 face=(int)rules.GetLSLIntegerItem(idx++); 10723 face=(int)rules.GetLSLIntegerItem(idx++);
10724 10724
@@ -10774,13 +10774,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10774 10774
10775 // TODO: Should be issuing a runtime script warning in this case. 10775 // TODO: Should be issuing a runtime script warning in this case.
10776 if (remain < 2) 10776 if (remain < 2)
10777 return null; 10777 return new LSL_List();
10778 10778
10779 return rules.GetSublist(idx, -1); 10779 return rules.GetSublist(idx, -1);
10780 } 10780 }
10781 } 10781 }
10782 10782
10783 return null; 10783 return new LSL_List();
10784 } 10784 }
10785 10785
10786 public LSL_List llGetPrimMediaParams(int face, LSL_List rules) 10786 public LSL_List llGetPrimMediaParams(int face, LSL_List rules)
@@ -11878,7 +11878,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11878 11878
11879 public LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end) 11879 public LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end)
11880 { 11880 {
11881 LSL_List pref = null; 11881 LSL_List pref;
11882 11882
11883 m_host.AddScriptLPS(1); 11883 m_host.AddScriptLPS(1);
11884 11884
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 9929dac..1458c95 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -416,7 +416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
416 { 416 {
417 if (type == typeof(object[])) 417 if (type == typeof(object[]))
418 { 418 {
419 object[] plist = (lslparm as LSL_List).Data; 419 object[] plist = ((LSL_List)lslparm).Data;
420 object[] result = new object[plist.Length]; 420 object[] result = new object[plist.Length];
421 for (int i = 0; i < plist.Length; i++) 421 for (int i = 0; i < plist.Length; i++)
422 { 422 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index c1f1ed5..b3f298a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2473,14 +2473,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2473 // on the ILSL_Api interface. 2473 // on the ILSL_Api interface.
2474 LSL_Api LSL_Api = (LSL_Api)m_LSL_Api; 2474 LSL_Api LSL_Api = (LSL_Api)m_LSL_Api;
2475 LSL_List retVal = new LSL_List(); 2475 LSL_List retVal = new LSL_List();
2476 LSL_List remaining = null; 2476 LSL_List remaining;
2477 List<SceneObjectPart> parts = LSL_Api.GetLinkParts(linknumber); 2477 List<SceneObjectPart> parts = LSL_Api.GetLinkParts(linknumber);
2478 foreach (SceneObjectPart part in parts) 2478 foreach (SceneObjectPart part in parts)
2479 { 2479 {
2480 remaining = LSL_Api.GetPrimParams(part, rules, ref retVal); 2480 remaining = LSL_Api.GetPrimParams(part, rules, ref retVal);
2481 } 2481 }
2482 2482
2483 while (remaining != null && remaining.Length > 2) 2483 while (remaining.Length > 2)
2484 { 2484 {
2485 linknumber = remaining.GetLSLIntegerItem(0); 2485 linknumber = remaining.GetLSLIntegerItem(0);
2486 rules = remaining.GetSublist(1, -1); 2486 rules = remaining.GetSublist(1, -1);
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index f14a8fb..2b93d84 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -502,7 +502,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
502 } 502 }
503 503
504 [Serializable] 504 [Serializable]
505 public class list 505 public struct list
506 { 506 {
507 private object[] m_data; 507 private object[] m_data;
508 508
@@ -909,7 +909,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
909 else 909 else
910 { 910 {
911 911
912 list result = null; 912 list result;
913 913
914 // If end is negative, then prefix list is empty 914 // If end is negative, then prefix list is empty
915 if (end < 0) 915 if (end < 0)