Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Unable to set LoadPlugin

  • 71 Views
  • Last Post 28 January 2022
  • Topic Is Solved
tbS_ posted this 27 January 2022

Hello,

im trying to write a plugin but i always get this error: Unable to set Core.AMP.LoadPlugins (List) Im using Windows 11 with VS2019, NetFramework i need to set to 4.6.2 because when i set it to 4.5 i get error that ModuleShared.dll is using 4.6.2.

When i try to debug i got this error. I use the Plugin Template. The NameSpace and Name are the same: TestPlugin.

Order By: Standard | Newest | Votes
Mike posted this 27 January 2022

What are you setting LoadPlugins too exactly?

tbS_ posted this 27 January 2022

i do like the wiki I set the AMP.exe off my local installation and as comand i use: +Core.AMP.LoadPlugins TestPlugin

Mike posted this 27 January 2022

It's expecting an array :) ["TestPlugin"] - you'll also want to take a look at the existing value in AMPConfig.conf to make sure you're including the other standard plugins (or just modify AMPConfig.conf and not bother using the command line to load it)

tbS_ posted this 27 January 2022

ah okay. so its write false down in the Wiki ? so i need to set: +Core.AMP.LoadPlugins ["TestPlugin"] right?

when i try like this i got the following:

[00:35:22] [Core Error]           : Unable to set Core.AMP.LoadPlugins (List) to [TestPlugin] [00:35:22] [Core Error]           : Unexpected character encountered while parsing value: T. Path '', line 1, position 2.

I changed the " to ' and got other errors..

CryptographicException [0] (CryptographicException) : Das angeforderte Objekt wurde nicht gefunden. at Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at Security.Cryptography.X509Certificates.X509Utils.QueryCertFileType(String fileName) at Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) at GSMyAdmin.SignatureVerification.VerifyWindows(String Filename) Unable to load plugin TestPlugin: Could not load file or assembly 'TestPlugin' or one of its dependencies. Failure during Cryptographic operation. (Exception from HRESULT: 0x80131430)

Dev License error ?

Mike posted this 27 January 2022

The wiki might be out of date, I'd suggest editing the value in the file rather than using the command line flag. The CryptographicException can be ignored.

tbS_ posted this 27 January 2022

I write down in the AMPConfig.conf this one: AMP.LoadPlugins=["other...","TestPlugin"]

but got the error from the last post and then: [00:55:56] [Core Error]           : Could not load plugin TestPlugin

in the project Build Events, remove the "REM" before the two xcopy lines What do you mean with that ?

tbS_ posted this 28 January 2022

try and try but dont work :( i new installed all, try many times but always the same .

Mike posted this 28 January 2022

In the project properties there's a post-build event, two of the lines have REM at the start at the REM needs removing and the paths adjusting so that when you build your plugin it goes to the right place.

tbS_ posted this 28 January 2022

xcopy "$(TargetPath)" "F:\AMPDatastore\Instances\AMPInstance1-ADS\Plugins\$(ProjectName)\" /Y

IF NOT EXIST "$(TargetDir)WebRoot\" GOTO NOWEB xcopy "$(TargetDir)WebRoot*.*" "F:\AMPDatastore\Instances\AMPInstance1-ADS\Plugins\$(ProjectName)\WebRoot\" /Y /E :NOWEB

this are the line. i only change my path. but never hear bevor what REM mean. but its not important because i can copy it by myself. i copy my DLL and the Webroot. Can i run the Template when i change Assemlby, Namespace etc or ist this code outdated ?

Mike posted this 28 January 2022

The assembly and namespace must be identical.

So "MyPlugin.dll" with an assembly of "MyPlugin" and namespace of "MyPlugin" with a class called "PluginMain" for example.

tbS_ posted this 28 January 2022

Yes i do like u write in wiki and the file.

so you can look Here..

I Dont know where is my error :(

Mike posted this 28 January 2022

Have you added your developer licence to AMP?

tbS_ posted this 28 January 2022

Yeah... mutiple times... it already says that im using it 2/1... but i got the same error on an non activated amp instance on an virtual machine. can i check it dev license is working ?

tbS_ posted this 28 January 2022

this is my local instance, activated over my Network license and then i use: ampinstmgr reactivate AMPInstance1-ADS MYKEY
Setup

Mike posted this 28 January 2022

In AMPs logs it'll say which licences are present and activated.

tbS_ posted this 28 January 2022

i dont see.

my amp logs look like this.

https://prnt.sc/26kvsv4

Mike posted this 28 January 2022

ADS isn't activated. Follow this guide: https://github.com/CubeCoders/AMP/wiki/Configuring-AMP-for-Enterprise-or-Network-Usage but then repeat the activation step with your developer key.

tbS_ posted this 28 January 2022

so first my key then the developer.

thank you ^^ it works but i do the same the time before but now it run the sample plugin :D now i can write it and add it to my instancen. i need write u for upgrade my dev. license? i write on local and when all work i will at it to my server-

is there any way to add a plugin to a specific game??

Close