Jump to content
  • 0
Samuel

Implementing custom @commands via HPM

Question

Hi everyone, I wanted to try adding @afk in the server via HPM

 

I have followed all the steps in here: http://herc.ws/wiki/Building_HPM_Plugin_for_gcc

 

the plugin source:

 

I have already tried the source in Windows using this guide: http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC

 

And it was a success. The problem is when I'm trying to implement it in Linux, I can't get it working,

 

always unknown command

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

 

You need to run "make plugins"



I've tried doing that, but still it shows an unknown command. (Sorry, forgot to enable plugin in plugins.conf)

Then the other thing that happens is when I start my server now, it always make the map server don't load, it just doesn't pop out of screen. (This happens when I activate the plugin via plugins.conf) (linux)

Does it mean that the code is broken? But its working in windows, Edited by Samuel

Share this post


Link to post
Share on other sites
  • 0

Plugins need to be compiled on their respective enviroment, aka a plugin Compiled on Windows 7 32bits, will not work on any other OS/Architecture. 

Do you get any errors/warnings when compiling on unix?

If you navigate to ~/server/plugins/ do you see your plugin.so? (Replace plugin.so with whatever the name of the plugin is, most likely afk.so)

How did you load your plugin @ conf/plugins.conf?

 

If the code was broken it'd most likely not compile

Try running gdb map-server 

If it crashes, do a bt full and paste the output here. 

Share this post


Link to post
Share on other sites
  • 0

Plugins need to be compiled on their respective enviroment, aka a plugin Compiled on Windows 7 32bits, will not work on any other OS/Architecture. 

Do you get any errors/warnings when compiling on unix?

If you navigate to ~/server/plugins/ do you see your plugin.so? (Replace plugin.so with whatever the name of the plugin is, most likely afk.so)

How did you load your plugin @ conf/plugins.conf?

 

If the code was broken it'd most likely not compile

Try running gdb map-server 

If it crashes, do a bt full and paste the output here. 

 

No errors when compiling,

 

Yes, I have an afk.so in my plugins folder

 

This is my Plugins.conf

 

plugins_list:[

  "db2sql",

  "sample",

 "afk"

]

 

I can't start that gdb map server,

Share this post


Link to post
Share on other sites
  • 0

I don't know if after the last plugin ("afk" in this case, you should put either a colon (,) or semicolon (;) for the plugins to work. Try with a semicolon first because it's what it sounds more logical for me.

Share this post


Link to post
Share on other sites
  • 0

I don't know if after the last plugin ("afk" in this case, you should put either a colon (,) or semicolon ( ;) for the plugins to work. Try with a semicolon first because it's what it sounds more logical for me.

 

Tried both and both gives syntax error on that line

Share this post


Link to post
Share on other sites
  • 0

The last entry in the array shouldnt contain a separator.

 

Samuel, if you don't have GDB try finding a guide to install it in your OS (its most likely either apt-get gdb or yum install gdb)

Once its installed you can run "gdb map-server" (You said you couldn run "gdb map server", there shouldnt be a space inbetween the name if you're using the default binary names) and get a full backtrace so we can better help you. 

Share this post


Link to post
Share on other sites
  • 0

Map server not loading after enabling plugins, that's what i think is happening to me also,

 

Maybe someone who's able to run their plugins in linux might share how they actually did it, :)

 

I'll try to install gdb asap

Share this post


Link to post
Share on other sites
  • 0

Sorry for reviving the post, but my problem is exactly the same and I already tried the options listed here, but nothing.

 

I'm trying to add a command on ubuntu 14.04 lts, but im always getting unknow command.

- No compiling error (make plugins)

- Already added the command on /conf/plugins.conf/

- The compilation is generating the .so file in /plugins/

- No warning/erros starting the emulator

-- Getting unknow command in game.

 

Someone knows why?

Edited by tedexx

Share this post


Link to post
Share on other sites
  • 0

Sorry for reviving the post, but my problem is exactly the same and I already tried the options listed here, but nothing.

 

I'm trying to add a command on ubuntu 14.04 lts, but im always getting unknow command.

- No compiling error (make plugins)

- Already added the command on /conf/plugins.conf/

- The compilation is generating the .so file in /plugins/

- No warning/erros starting the emulator

-- Getting unknow command in game.

 

Someone knows why?

post your plugins.conf

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...

×
×
  • Create New...

Important Information

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