Closed Marky-S closed 1 year ago
I'm unable to reproduce it with the given repro steps, the int
version also doesn't make sense in this context. Can you supply more of the error and code on this? Especially what you run in the Action
method.
Do note that the error helper (expected & received info) only applies for wrappers, i.e.: any made through Func.Create
, therefore its information is useless on non-wrappers, like the ones you use now.
Yeah, second time there was a mistake in my wrapper-method.
I always get confused with the error context because of this part of the exception:
[script:core] SCRIPT ERROR: Could not invoke event handler Action
[script:core] expected: (CitizenFX.Core.Remote, Object[])
[script:core] received: (UInt32 , String )
[script:core] * Any type in red is not convertible, castable, or simply missing and requires attention.
expected
and received
fields both contained red arguments.
I'll be more attentive in the future
What happened?
I created remote event from client to server with arguments like
[uint modelHash, string modelType]
and received this error:Expected result
Correct event handling
Reproduction steps
uint
argDynFunc
delegate// ...wrapper instance class... // public object Action(Remote remote, params object[] args)