Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

crosire

Community Script Hook V .NET

Recommended Posts

kagikn

 

 

 

 

[20:35:52] [ERROR] Failed to create script domain ':

System.InvalidCastException: Could not cast transparent proxy to type "GTA.ScriptDomain".

in GTA.ScriptDomain.Load (String path)

 

Whats problem?

 

public static ScriptDomain Load(string path){	if (!Path.IsPathRooted(path))	{		path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), path);	}	// Create AppDomain	var setup = new AppDomainSetup();	setup.ApplicationBase = path;	setup.ShadowCopyFiles = "true";	setup.ShadowCopyDirectories = path;	var appdomain = AppDomain.CreateDomain("ScriptDomain_" + (path.GetHashCode() * Environment.TickCount).ToString("X"), null, setup, new System.Security.PermissionSet(System.Security.Permissions.PermissionState.Unrestricted));	appdomain.InitializeLifetimeService();    Log("[DEBUG]", "Path ", path);    ScriptDomain scriptdomain = null;	try	{		scriptdomain = (ScriptDomain)(appdomain.CreateInstanceFromAndUnwrap(typeof(ScriptDomain).Assembly.Location, typeof(ScriptDomain).FullName));	}	catch (Exception ex)	{		Log("[ERROR]", "Failed to create script domain':", Environment.NewLine, ex.ToString());		AppDomain.Unload(appdomain);		return null;	}	Log("[iNFO]", "Loading scripts from '", path, "' ...");	if (Directory.Exists(path))	{		var filenameScripts = new List<string>();		var filenameAssemblies = new List<string>();		try		{			filenameScripts.AddRange(Directory.GetFiles(path, "*.vb", SearchOption.AllDirectories));			filenameScripts.AddRange(Directory.GetFiles(path, "*.cs", SearchOption.AllDirectories));			filenameAssemblies.AddRange(Directory.GetFiles(path, "*.dll", SearchOption.AllDirectories));		}		catch (Exception ex)		{			Log("[ERROR]", "Failed to reload scripts:", Environment.NewLine, ex.ToString());			AppDomain.Unload(appdomain);			return null;		}		for (int i = 0; i < filenameAssemblies.Count; i++)		{			var filename = filenameAssemblies[i];			var assemblyName = AssemblyName.GetAssemblyName(filename);			try			{				if (AssemblyName.GetAssemblyName(filename).Name.StartsWith("ScriptHookVDotNet", StringComparison.OrdinalIgnoreCase))				{					Log("[WARNING]", "Removing assembly file '", Path.GetFileName(filename), "'.");					filenameAssemblies.RemoveAt(i--);					try					{						File.Delete(filename);					}					catch (Exception ex)					{						Log("[ERROR]", "Failed to delete assembly file:", Environment.NewLine, ex.ToString());					}				}			}			catch (Exception ex)			{				Log("[ERROR]", "Failed to load assembly file '", Path.GetFileName(filename), "':", Environment.NewLine, ex.ToString());			}		}		foreach (string filename in filenameScripts)		{			scriptdomain.LoadScript(filename);		}		foreach (string filename in filenameAssemblies)		{			scriptdomain.LoadAssembly(filename);		}	}	else	{		Log("[ERROR]", "Failed to reload scripts because the directory is missing.");	}	return scriptdomain;}
Make sure you use the latest v3 build. That works for me, and that would work for you, too. Some old builds don't work due to a wrong root namespace.

Its lasted version

No, it's not (if you modified nothing). The code you posted is different from this (the latest build). https://github.com/crosire/scripthookvdotnet/blob/92614a6eb4d935524a24b6d166b9557772c60d5b/source/core/ScriptDomain.cs#L87

Here's the download link for the latest build. https://ci.appveyor.com/project/crosire/scripthookvdotnet/build/dev_v3/1390/artifacts

 

 

Im using last version, really last. Im download default source and execute.

 

Okay, but I found one thing. If the dll name is ScriptHookVDotNet.dll, the dll won't be loaded. If you renamed the dll ScriptHookVDotNet.dll, revert it.

Share this post


Link to post
Share on other sites
hellohihey

Hi!

I juust installed everything I need for the "Single Player Apartment Mod" and during the GTA 5 loading screen I get the following erroer-message and GTA 5 stops loading. When I click "OK" it continue to load and I can play the game but without the features of the mod, of course. Does anyone know how to fix that?

 

---------------------------
Community Script Hook V .NET
---------------------------
FATAL: Unable to load 'C:\Program Files (x86)\Grand Theft Auto V\ScriptHookVDotNet2.dll' due to the following exception:
System.IO.FileLoadException: Die Datei oder Assembly "file:///C:\Program Files (x86)\Grand Theft Auto V\ScriptHookVDotNet2.dll" oder eine Abhängigkeit davon wurde nicht gefunden. Der Vorgang wird nicht unterstützt. (Ausnahme von HRESULT: 0x80131515)
Dateiname: "file:///C:\Program Files (x86)\Grand Theft Auto V\ScriptHookVDotNet2.dll" ---> System.NotSupportedException: Es wurde versucht, eine Assembly von einer Netzwerkadresse zu laden, was in früheren Versionen von .NET Framework zum Ausführen der Assembly als Sandkastenassembly geführt hätte. In dieser Version von .NET Framework wird die CAS-Richtlinie standardmäßig nicht aktiviert, dieser Ladevorgang kann daher gefährlich sein. Wenn Sie nicht beabsichtigen, durch diesen Ladevorgang eine Sandkastenassembly zu erstellen, aktivieren Sie den loadFromRemoteSources-Schalter. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkId=155569".
bei System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
bei System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
bei System.Reflection.Assembly.LoadFrom(String assemblyFile)
bei ManagedInit()
---------------------------
OK
---------------------------
Thanks .-)

Share this post


Link to post
Share on other sites
stef538

Hey guys, probably a dumb question but I've been out of modding since late 2015.

Is it possible to load textures/images from your resource file from inside your script like it's possible with the GTA IV Scripthook? or do we still need to extract all the textures/images before we can access them?

Share this post


Link to post
Share on other sites
Mini_Purple

i've been having issues loading every mod that is made for DotNet, this is the log that i get if i just launch the game without manually creating a scripts folder:

[22:50:19] [DEBUG] Created script domain 'ScriptDomain_57C54688' with v2.10.5. [22:50:19] [DEBUG] Loading scripts from 'E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts' into script domain 'ScriptDomain_57C54688' ... [22:50:19] [ERROR] Failed to reload scripts because the directory is missing. 

So i manually created a scripts folder and installed a few mods and this is what i got:

[22:58:48] [DEBUG] Created script domain 'ScriptDomain_9D65D0F0' with v2.10.5. [22:58:48] [DEBUG] Loading scripts from 'E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts' into script domain 'ScriptDomain_9D65D0F0' ... [22:58:48] [iNFO] Loading assembly 'Advanced Bodyguards.dll' ... [22:58:48] [ERROR] Failed to load assembly 'Advanced Bodyguards.dll': System.IO.FileNotFoundException: Could not load file or assembly 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\Advanced Bodyguards.dll' or one of its dependencies. The system cannot find the file specified. File name: 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\Advanced Bodyguards.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at GTA.ScriptDomain.LoadAssembly(String filename)WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].[22:58:48] [iNFO] Loading assembly 'CrysisNanosuit.net.dll' ... [22:58:48] [ERROR] Failed to load assembly 'CrysisNanosuit.net.dll': System.IO.FileNotFoundException: Could not load file or assembly 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\CrysisNanosuit.net.dll' or one of its dependencies. The system cannot find the file specified. File name: 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\CrysisNanosuit.net.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at GTA.ScriptDomain.LoadAssembly(String filename)WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].[22:58:48] [iNFO] Loading assembly 'NativeUI.dll' ... [22:58:48] [ERROR] Failed to load assembly 'NativeUI.dll': System.IO.FileNotFoundException: Could not load file or assembly 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\NativeUI.dll' or one of its dependencies. The system cannot find the file specified. File name: 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\NativeUI.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at GTA.ScriptDomain.LoadAssembly(String filename)WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].[22:58:48] [iNFO] Loading assembly 'NIBMods.net.dll' ... [22:58:48] [ERROR] Failed to load assembly 'NIBMods.net.dll': System.IO.FileNotFoundException: Could not load file or assembly 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\NIBMods.net.dll' or one of its dependencies. The system cannot find the file specified. File name: 'file:///E:\#SteamGames\steamapps\common\Grand Theft Auto V\scripts\NIBMods.net.dll' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at GTA.ScriptDomain.LoadAssembly(String filename)WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

I tried this with net framework 4.6.2, with and without the ASP.NET, running as admin, with net framework 4.7.1, and finally with only scripthookv, asi loader, scripthookvdotnet and the scripts in the scripts folder and still no progress there. i have both version 12.0.30501 and 12.0.40660 x86 and x64 Visual C++ redist 2013, and Visual C++ redist 2015 version 14.0.24215 x86 and x64
What should i do to get the scripts to load?
Thanks in advance.

Edited by Mini_Purple

Share this post


Link to post
Share on other sites
S.O.SHELP
Posted (edited)
This is my ScriptHookVDotNet.log


[03:00:51] [DEBUG] Created script domain 'ScriptDomain_3781DE5C' with v2.10.5.

[03:00:51] [DEBUG] Loading scripts from 'C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto V\scripts' into script domain 'ScriptDomain_3781DE5C' ...

[03:00:51] [ERROR] Failed to reload scripts because the directory is missing.



I need help I have been trying to work this for three days and I have done everything. Down Below is what I have installed and have been trying to install


NIBMods.net.dll

ScriptHookVDotNet.asi

ScriptHookVDotNet.dll

TFlash.net.dll

4468af-CW The Flash Characters Pack.rar
Edited by S.O.SHELP

Share this post


Link to post
Share on other sites
Google61
Posted (edited)

[deleted]

Edited by Google61

Share this post


Link to post
Share on other sites
mikecyclexxx

RIP mod?

 

No updates for months, no scripts loading and game crashing.

Share this post


Link to post
Share on other sites
HiToKa

Hello, I need help I don't know exactly the problem from who, when I try to open GTA 5 it says "[09:17:59] FATAL: Can't find native 0xC1F1920BAF281317"

This is is a log from ScriptHookV.log

Quote

[09:17:59] FATAL: Can't find native 0xC1F1920BAF281317
[09:18:04] UNINIT: Unregistering script 'ScriptHookVDotNet.asi'
[09:18:04] UNINIT: Unregistering script 'OpenInteriors.asi'
[09:18:04] UNINIT: Unregistering script 'NativeTrainer.asi'
[09:18:04] UNINIT: Unregistering script 'EnhancedNativeTrainer.asi'

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.