Jump to content

[SOLVED] Could not load plugin from "...". Does not have a suitable entry point.


minipunch

Recommended Posts

Hello,

I am trying to make my first call out plugin for LSPDFR. I have looked over every post in this forum, as well as follow examples line by line from LukeD's "API Example", however I keep running into the same silly problem.

Apparently, my call out plugin doesn't have a suitable entry point. Even though I literally copied over everything from one of LukeD's example callouts (making sure to mimic the folder structure precisely).

I am under the impression that by default RPH checks for the first static function that returns void named "Main" as an entry point. But if you look at ANY callout (examples from LukeD, or even releases that I have decompiled to see how they work) none of them have a function that fits the requirement for a 'suitable entry point'. The only thing they all have is a constructor with the same name as the class that inherits from 'Plugin', that is (usually) left blank.

I've tried changing LukeD's example call out's "main" constructor to be static and have a return value of void so that it meets the default 'suitable entry point' requirements, and that allowed me as far as to load the plugin in game, but the call outs were not being registered because I also had to include an infinite while loop in order for the call out not to end immediately after loading the main function (which is clearly not what I wanted).

So then I tried actually defining a new EntryPoint using (notice "EntryPoint = "Initialize")

[assembly: Rage.Attributes.Plugin("TESTCALLOUT2", Author = "MINIPUNCH", Description = "BY MINIPUNCH", EntryPoint = "Initialize")]

to try and make the plugin load. But this doesn't work because I guess the initialize function isn't a valid entry point either.

Could this be because I am using Visual Basic 2015 instead of Visual Basic 2013? I can't think of another reason why, after mimicking the format of other working examples, my plugin won't load.

----------CONSOLE SCREENSHOT----

(split due to text overflow)

http://postimg.org/image/r6gv93u3b/

http://postimg.org/image/45ttnfos9/

----------MY SOURCE FILES-------------

Here is the entire code for Main.cs (which is copied straight from LukeD's example):

http://pastebin.com/Ee5c4C2j

Here is the entire code for the single call out class I have (which is copied straight from LukeD's example):

http://pastebin.com/uq9cvSGA

Sorry for the long post, but I sure hope someone can figure out what I am doing wrong here.

The only thing I can think of at this point is it is because I am using visual studio 2015 instead of 2013.

greatly appreciate your time.

Edited by minipunch
Link to comment
Share on other sites

You only need the Rage.Attributes line if making a standalone plugin (ie, not an LSPDFR plugin). Not sure if it makes a difference, but my main class is defined as public not internal.

I can tell you it's definitely not VS2015, as I've been using that from the beginning and it works just fine for callouts / rage plugins in general.

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

Link to comment
Share on other sites

Thank you for your response, Darkmyre. You're right. I didn't need that Rage.Attributes line, but that wasn't the entire problem.

I was also putting my compiled .dll file into the wrong folder. It needed to go into the "../plugins/LSPDFR" folder instead of just "../plugins" folder.

I realized this after looking closer at the folder structure of other people's call out releases. :ninja:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...