Implementing custom @commands via HPM

Samuel

New member
Messages
397
Points
0
Discord
Elijah#5798
Github
Samuel23
Emulator
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,
 
Last edited by a moderator:
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. 

 
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,

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

 
I don't know if after the last plugin ("afk" in this case, you should put either a colon (,) or semicolon (
default_wink.png
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

 
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. 

 
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,
default_smile.png


I'll try to install gdb asap

 
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?

 
Last edited by a moderator:
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

 
Hey, first, thank you for replying!

I've manage to fix it, it was a logic problem in the plugin. Everything else was ok.

 
Back
Top