AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved Could not find required plugin (https://forums.alliedmods.net/showthread.php?t=295657)

headline 04-01-2017 02:53

Could not find required plugin
 
Alright. So I've been tripped up trying to solve this problem. For whatever reason, my plugin "donationstest.smx" can not find the required "donations" plugin, but I can not for the life of me figure out why. The name of the donations plugin is donations.smx and the name of the plugin in the myinfo is "donations" aswell.

Currently running latest SM snapshot.

Error:
Code:

L 04/01/2017 - 01:47:58: SourceMod error session started
L 04/01/2017 - 01:47:58: Info (map "am_water") (file "errors_20170401.log")
L 04/01/2017 - 01:47:58: [SM] Unable to load plugin "donationstest.smx": Could not find required plugin "donations"

donationstest.sp


donations.inc


Header of donations.sp


(and yes, the donations plugin is successfully loaded and functioning properly)

headline 04-01-2017 03:42

Re: Could not find required plugin
 
I worked it out with That One Guy and apparently it ended up working once the plugin library I was registering was the exact same name as the name of the plugin itself.

All I did was change

Code:

RegPluginLibrary("hl_donations");
to
Code:

RegPluginLibrary("donations");

I'm not sure if this behavior is intended and I'd love for someone to elaborate

WildCard65 04-01-2017 08:20

Re: Could not find required plugin
 
Quote:

Originally Posted by Headline (Post 2508439)
public SharedPlugin __pl_donations =
{
name = "donations", // This is the name SM expects to given at some point to a call to RegPluginLibrary, it's independent of the var's name.
file = "donations.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};

Reference: https://github.com/alliedmodders/sou...nSys.cpp#L1069

headline 04-01-2017 14:22

Re: Could not find required plugin
 
Quote:

Originally Posted by WildCard65 (Post 2508493)

Gotcha. Thanks for clarifying.


All times are GMT -4. The time now is 03:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.