Jump to content
  • 0
Sign in to follow this  
wabbuwabbu

Error adding @pk plugin

Question

Hello, 
I'm currently trying to add a @pk plugin to my server.
I'm following this guide to add plugins made for linux: http://herc.ws/wiki/Building_HPM_Plugin_for_gcc

Let me run you through what I have done:

1st I went to my folder "Hercules/conf/" used nano to open plugins.conf and edited and added the following:

plugins_list: [
        /* Enable HPMHooking when plugins in use rely on Hooking */
        "HPMHooking",
        //"db2sql",
        //"sample",
        //"other",
        "@pk",
]

2nd step was to go to "Hercules/src/plugins/" used nano to create @pk.c and add this code: https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/%40pk.c

The only thing I modified from the @pk.c code was the delay timer:

int config_delay = 5; // After turn pk on/off, how many seconds delay before the player allow to pk on/off ?

I changed it to 60 seconds:

int config_delay = 60; // After turn pk on/off, how many seconds delay before the player allow to pk on/off ?

I'm not exactly sure if I should do any other modification apart from this one.

Right after this I started the server and the moment it started this error appeared:

[Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support.
[Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support.
[Fatal Error]: HPM:plugin_load: failed to load 'plugins/@pk.so' (error: plugins/@pk.so: cannot open shared object file: No such file or directory)!
[Fatal Error]: HPM:plugin_load: failed to load 'plugins/@pk.so' (error: plugins/@pk.so: cannot open shared object file: No such file or directory)!
[Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support.
[Fatal Error]: HPM:plugin_load: failed to load 'plugins/@pk.so' (error: plugins/@pk.so: cannot open shared object file: No such file or directory)!

So from what I understood from the fatal error message it says it can not find the "plugins/@pk.so" because theres not such file or directory.

So I procceded to create that file in the directory (Hercules/src/plugins/) I used nano to create "@pk.so" add added the code again https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/%40pk.c

Set the delay timer to 60 and nothing else.

So now, my "Hercules/src/plugins/" folder is like this

/Hercules/src/plugins# ls
constdb2doc.c            HPMHooking    Makefile.in  sample.c
db2sql.c                 HPMHooking.c  mapcache.c   script_mapquit.c
dbghelpplug.c            HPMHooking.h  @pk.c
generate-translations.c  Makefile      @pk.so

I proceeded to start the server again, to see what error message would show now this came showed up:

[Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support.
[Fatal Error]: HPM:plugin_load: failed to load 'plugins/@pk.so' (error: plugins/@pk.so: cannot open shared object file: No such file or directory)!
[Fatal Error]: HPM:plugin_load: failed to load 'plugins/@pk.so' (error: plugins/@pk.so: cannot open shared object file: No such file or directory)!
[Info]: Server uses 'select' as event dispatcher
[Info]: Server supports up to '1024' concurrent connections.
[Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support.
[Fatal Error]: HPM:plugin_load: failed to load 'plugins/@pk.so' (error: plugins/@pk.so: cannot open shared object file: No such file or directory)!

It still says that there is not such file or directory.
I'm out of ideas so I ask for help.
Thank you for your time.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Why you created @pk.so?

After you put plugin source in src/plugins, need compile this plugin

run

make plugin.@pk

after if was no errors, you can start server

Share this post


Link to post
Share on other sites
  • 0

Thank you 4144 for the help. 

Indeed that's exactly what I was doing wrong, I jumped the step of running make plugin.
I proceeded on running: make @pk 

/Hercules/src/plugins# make @pk
        CC      @pk.c
        PLUGIN  @pk

Server now runs correctly :) 

Solved.

Edited by wabbuwabbu

Share this post


Link to post
Share on other sites
  • 0

Hello, I'm running on the same issue but different plugin (marketclone). at first I tried using make plugin.marketclone but it won't let me run it. So I decided to use make plugins and

 

and did something like this:
image.png.84c9021c2a58a1dc477c1818ae9d246c.png

 

 

I also added the plugin in conf/plugins.conf

image.png.0e04881fbc84b3a58a655ca0f9213a4a.png

 

run make clean > make plugins > make sql
no error at all but when I start the server I got this same issue.

image.thumb.png.a70f6599b4d0c96d1b4157b8ef52baa8.png

 

Thanks for your reply. 

 

Share this post


Link to post
Share on other sites
  • 0
4 minutes ago, Hadeszeus said:

Hello, I'm running on the same issue but different plugin (marketclone). at first I tried using make plugin.marketclone but it won't let me run it. So I decided to use make plugins and

 

and did something like this:
image.png.84c9021c2a58a1dc477c1818ae9d246c.png

 

 

I also added the plugin in conf/plugins.conf

image.png.0e04881fbc84b3a58a655ca0f9213a4a.png

 

run make clean > make plugins > make sql
no error at all but when I start the server I got this same issue.

image.thumb.png.a70f6599b4d0c96d1b4157b8ef52baa8.png

 

Thanks for your reply. 

 

did you put your plugin file in the src/plugins folder?

 

to make it easier to compile just command

make clean && make all

Edited by Kuya Jeo

Share this post


Link to post
Share on other sites
  • 0

you have hpmhooking disabled. this mean most advanced plugins will not works. need enable hpmhooking too

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.