From OpenSimulator

Jump to: navigation, search

I don't know if i should submit this as a bug, or if it's already submitted, or if it's known, but the example script causes a script error for me. osFunctions are enabled on my server, with thread level set to VeryHigh. The script error is:

[03:12 PM]  Primitive: System.Reflection.TargetParameterCountException:
parameters do not match signature
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, 
System.Globalization.CultureInfo culture) [0x00000] in <filename 
  at System.Reflection.MethodBase.Invoke (System.Object obj, 
System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at OpenSim.Region.ScriptEngine.Shared.ScriptBase.Executor.ExecuteEvent 
(System.String state, System.String FunctionName, System.Object[] args) 
[0x00000] in <filename unknown>:0 
  at OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass.ExecuteEvent
(System.String state, System.String FunctionName, System.Object[] args) 
[0x00000] in <filename unknown>:0 
  at OpenSim.Region.ScriptEngine.Shared.Instance.ScriptInstance.EventProcessor ()
[0x00000] in <filename unknown>:0

I don't know what this error means. Is it something in my config? Is the function broken? Server is running in Linux, Mono v2.6.7 OpenSimulator version: OpenSim 0.7.1 Dev OSgrid 0.7.1 (Dev) 8f1a794: 2010-11-18

--Fritigern 23:24, 10 December 2010 (UTC)

I know this is ancient by now, but it suggests the osNpcCreate signature changed and a previously compiled script DLL was still being used. The latest versions of OpenSim delete all the old script DLLs on each restart, so this might go away there -- Justincc 18:42, 28 June 2011 (UTC)
I take it back - this isn't happening on compile but at runtime. Probably a bug that needs to be addressed -- Justincc 18:49, 28 June 2011 (UTC)
I tried this out earlier and the osNpc* functions were broken (I've since started to fix them) but I didn't meet the problem you see above. Perhaps you could try the latest code with a clean checkout? This is also being discussed in Mantis 5148 -- Justincc 02:43, 29 June 2011 (UTC)

I looked into this script - It will fail just because touch_start handler method doesn't have an integer as a parameter. This case is NOT the issue of osNpcCreate(). Yeah, I wish I could know the cause by looking into script error window or region console... I found this cause by uncommenting

//m_log.Debug("ScriptEngine: Executing function name: " + EventName);

in Executor.cs at line 175 and changing some to show it on the region console. It showed like that:

ScriptEngine: Executing function name: default_event_touch_start

It might be helpful to have some verbose option for script execution:) -- Makopoppo 11:47, 29 June 2011 (UTC)

Personal tools
About This Wiki