Add support for void return type
parent
1ef50fef44
commit
82ac1763fb
|
@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public void modInvokeN(string fname, params object[] parms)
|
||||
{
|
||||
Type returntype = m_comms.LookupReturnType(fname);
|
||||
if (returntype != typeof(string))
|
||||
if (returntype != typeof(void))
|
||||
MODError(String.Format("return type mismatch for {0}",fname));
|
||||
|
||||
modInvoke(fname,parms);
|
||||
|
@ -264,6 +264,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
if (result != null)
|
||||
return result;
|
||||
|
||||
Type returntype = m_comms.LookupReturnType(fname);
|
||||
if (returntype == typeof(void))
|
||||
return null;
|
||||
|
||||
MODError(String.Format("Invocation of {0} failed; null return value",fname));
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
Loading…
Reference in New Issue