ScriptHookRDR2DotNet
ScriptHookRDR2DotNet copied to clipboard
Native.Function.Call can only be called from the main thread.
I have gotten this before. Reloading scripts usually fixed it . But now its every time. Even the example script. The only way i can stop it is to set tick to 1000. Then after a few seconds set tick to 1. [19:44:49] [ERROR] Caught fatal unhandled exception: System.InvalidOperationException: Native.Function.Call can only be called from the main thread. at RDR2.Native.Function.Call[T](Hash hash, InputArgument[] arguments) at RDR2.Game.get_Player() at ExampleScript.Main.OnTick(Object sender, EventArgs e) in c:\Program Files (x86)\Steam\steamapps\common\Red Dead Redemption 2\scripts\ExampleScript.cs:line 24 at RDR2DN.Script.MainLoop() [19:44:49] [ERROR] The exception was thrown while executing the script ExampleScript.Main. [19:44:49] [WARNING] Aborted script ExampleScript.Main. [19:44:54] [ERROR] Script 'ExampleScript.Main' is not responding! Aborting ... [19:44:54] [WARNING] Aborted script ExampleScript.Main.
Thanks for reporting, and sorry for delayed response. Working to fix.
Reinstalled C++ runtimes. And its working again.