Unable to load scripts (Failed to instantiate script)
-
Edit: SOLVED!
Basically it loads ASI scripts fine but any of the scripts folder scripts it doesnt load.
Here's the scripthookvdotnet log:[22:40:15] [DEBUG] Loading API from .\ScriptHookVDotNet-univ2.dll ...
[22:40:15] [DEBUG] Loading API from .\ScriptHookVDotNet.dll ...
[22:40:15] [DEBUG] Loading API from .\ScriptHookVDotNet2.dll ...
[22:40:15] [DEBUG] Loading API from .\ScriptHookVDotNet3.dll ...
[22:40:15] [DEBUG] Loading scripts from E:\Steam\steamapps\common\Grand Theft Auto V\scripts ...
[22:40:15] [DEBUG] Loading assembly ATMBankHeist.dll ...
[22:40:15] [INFO] Found 1 script(s) in ATMBankHeist.dll resolved to API 0.0.0.
[22:40:15] [DEBUG] Loading assembly AtmRobberies.dll ...
[22:40:15] [INFO] Found 1 script(s) in AtmRobberies.dll resolved to API 2.10.9.
[22:40:15] [DEBUG] Loading assembly gTaTer_HostagesV.dll ...
[22:40:15] [WARNING] Resolving API version 0.0.0.
[22:40:15] [INFO] Found 3 script(s) in gTaTer_HostagesV.dll resolved to API 2.10.9.
[22:40:15] [DEBUG] Loading assembly HandsUp.dll ...
[22:40:15] [INFO] Found 1 script(s) in HandsUp.dll resolved to API 2.10.9.
[22:40:15] [DEBUG] Loading assembly NativeUI.dll ...
[22:40:15] [INFO] Found 1 script(s) in NativeUI.dll resolved to API 2.10.9.
[22:40:15] [DEBUG] Loading assembly PacificStandard.dll ...
[22:40:15] [INFO] Found 1 script(s) in PacificStandard.dll resolved to API 2.10.9.
[22:40:15] [DEBUG] Loading assembly Rob_Fleeca_V2.dll ...
[22:40:16] [INFO] Found 1 script(s) in Rob_Fleeca_V2.dll resolved to API 2.10.9.
[22:40:16] [DEBUG] Loading assembly SupportHeli.dll ...
[22:40:16] [INFO] Found 1 script(s) in SupportHeli.dll resolved to API 3.0.2.
[22:40:16] [DEBUG] Loading assembly TheBlackMarket.dll ...
[22:40:16] [INFO] Found 1 script(s) in TheBlackMarket.dll resolved to API 2.10.9.
[22:40:16] [DEBUG] Loading assembly Watch Your Death.dll ...
[22:40:16] [WARNING] Unable to resolve API version 2.10.12.
[22:40:16] [DEBUG] Instantiating script AtmRobberies.Main ...
[22:40:16] [ERROR] Failed to instantiate script AtmRobberies.Main because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.ExecuteTask(IScriptTask task)
at GTA.Native.Function.Call[T](UInt64 hash, InputArgument[] arguments)
at GTA.Game.get_GameTime()
at AtmRobberies.Main..ctor()
[22:40:16] [DEBUG] Instantiating script RP.Bank ...
[22:40:16] [ERROR] Failed to instantiate script RP.Bank because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.PinString(String string)
at GTA.Native.?A0x55605b1d.ObjectToNative(Object value)
at GTA.Scaleform..ctor(String scaleformID)
at NativeUI.UIMenu..ctor(String title, String subtitle, Point offset, String spriteLibrary, String spriteName)
at NativeUI.UIMenu..ctor(String title, String subtitle)
at RP.Bank..ctor()
[22:40:16] [DEBUG] Instantiating script gTaTer_HostagesV.Hostage ...
[22:40:16] [ERROR] Failed to instantiate script gTaTer_HostagesV.Hostage because no public default constructor was found.
[22:40:16] [DEBUG] Instantiating script gTaTer_HostagesV.Main ...
[22:40:16] [ERROR] Failed to instantiate script gTaTer_HostagesV.Main because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.LookupScriptFilename(Type scripttype)
at GTA.Script..ctor()
at gTaTer_HostagesV.Main..ctor()
[22:40:16] [DEBUG] Instantiating script gTaTer_HostagesV.PMenu ...
[22:40:16] [ERROR] Failed to instantiate script gTaTer_HostagesV.PMenu because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.LookupScriptFilename(Type scripttype)
at GTA.Script..ctor()
at gTaTer_HostagesV.PMenu..ctor()
[22:40:16] [DEBUG] Instantiating script HandsUp.Main ...
[22:40:16] [ERROR] Failed to instantiate script HandsUp.Main because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.LookupScriptFilename(Type scripttype)
at GTA.Script..ctor()
at HandsUp.Main..ctor()
[22:40:16] [DEBUG] Instantiating script NativeUI.BigMessageThread ...
[22:40:16] [ERROR] Failed to instantiate script NativeUI.BigMessageThread because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.LookupScriptFilename(Type scripttype)
at GTA.Script..ctor()
at NativeUI.BigMessageThread..ctor()
[22:40:16] [DEBUG] Instantiating script PacificStandard.Main ...
[22:40:16] [ERROR] Failed to instantiate script PacificStandard.Main because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.ExecuteTask(IScriptTask task)
at GTA.Native.Function.Call[T](UInt64 hash, InputArgument[] arguments)
at GTA.Game.get_GameTime()
at PacificStandard.Main..ctor() in C:\Users\Daniel\source\repos\PacificStandard\PacificStandard\Class1.cs:line 170
[22:40:16] [DEBUG] Instantiating script RobFleeca ...
[22:40:16] [ERROR] Failed to instantiate script RobFleeca because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.ExecuteTask(IScriptTask task)
at GTA.Native.Function.Call[T](UInt64 hash, InputArgument[] arguments)
at GTA.Game.get_GameTime()
at RobFleeca..ctor() in C:\Users\Daniel\source\repos\Rob_Fleeca_V2\Rob_Fleeca_V2\Class1.cs:line 167
[22:40:16] [DEBUG] Instantiating script GFPS.Main ...
[22:40:16] [INFO] Started script GFPS.Main.
[22:40:16] [DEBUG] Instantiating script TheBlackMarket.Main ...
[22:40:16] [ERROR] Failed to instantiate script TheBlackMarket.Main because constructor threw an exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GTA.ScriptDomain.ExecuteTask(IScriptTask task)
at GTA.Native.Function.Call[T](UInt64 hash, InputArgument[] arguments)
at GTA.Game.get_GameTime()
at TheBlackMarket.Main..ctor() in C:\Users\Daniel\source\repos\TheBlackMarket\TheBlackMarket\Class1.cs:line 15
-
You've got a large share of errors.
Scripts I could identify causing the error: Atm Robberies, Pacific Standard Heist, Fleeca Heist, The Black Market, Hands Up, V Hostages.
I don't think it's caused by the scripts since I know myself they are working. Try reinstalling the new Scripthook v, Scripthook vdot net and NativeUI files. Also try installing the Microsoft Visual C++ Redistributable Package for Visual Studio 2013 (x64) and the Microsoft .NET Framework 4.5.2 .
-
Thanks for the suggestions, but after trying all of them, still no luck.
The log shows the exact same stuff. Any other ideas?Edit: I got most of my mods working, but some really cool ones still don't work.
Edit #2: Everything works now
-
@RealSkyr0 what you do to fix? i got the same error