Fix problem with modInvoke defined integer constants being build into
scripts as boxed integers rather than proper reference to a new LSLInteger. This fixes an exception when using a registered integer constant in a script.TeleportWork
parent
07e4958b19
commit
87ee0c395e
|
@ -319,7 +319,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
object[] convertedParms = new object[parms.Length];
|
object[] convertedParms = new object[parms.Length];
|
||||||
for (int i = 0; i < parms.Length; i++)
|
for (int i = 0; i < parms.Length; i++)
|
||||||
convertedParms[i] = ConvertFromLSL(parms[i],signature[i], fname);
|
convertedParms[i] = ConvertFromLSL(parms[i], signature[i], fname);
|
||||||
|
|
||||||
// now call the function, the contract with the function is that it will always return
|
// now call the function, the contract with the function is that it will always return
|
||||||
// non-null but don't trust it completely
|
// non-null but don't trust it completely
|
||||||
|
@ -444,7 +444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MODError(String.Format("{1}: parameter type mismatch; expecting {0}",type.Name, fname));
|
MODError(String.Format("{0}: parameter type mismatch; expecting {1}, type(parm)={2}", fname, type.Name, lslparm.GetType()));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -937,7 +937,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||||
{
|
{
|
||||||
string retval = null;
|
string retval = null;
|
||||||
if (value is int)
|
if (value is int)
|
||||||
retval = ((int)value).ToString();
|
retval = String.Format("new LSL_Types.LSLInteger({0})",((int)value).ToString());
|
||||||
else if (value is float)
|
else if (value is float)
|
||||||
retval = String.Format("new LSL_Types.LSLFloat({0})",((float)value).ToString());
|
retval = String.Format("new LSL_Types.LSLFloat({0})",((float)value).ToString());
|
||||||
else if (value is string)
|
else if (value is string)
|
||||||
|
|
Loading…
Reference in New Issue