![](http://board.herc.ws/uploads/set_resources_4/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
akka
-
Content Count
8 -
Joined
-
Last visited
Posts posted by akka
-
-
change: clif->chsys_quit(sd) to channel->quit(sd)
-
-
-
I originally posted this in the HPM datacheck announcement thread, but i didn't get an answer. So im just wondering if anyone else is experiencing this problem.
The problem started yesterday after I updated my server to get access to the new datacheck feature, It all went very smooth and I compiled it as usual without any errors. I might add that i added:
#include "../common/HPMDataCheck.h"
and made sure that it was the last included file:
But when i tried to run my server i got the following errors:
[Warning]: HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for plugin/HPMHooking.dll, most likely not including HPMDataCheck.h, skipping...[Warning]: HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for plugin/custom_plugin.dll, most likely not including HPMDataCheck.h, skipping...
So I checked the code again. I checked both my custom plugin and HPMHooking, and HPMDataCheck.h was indeed included in both of 'em.
When i compiled i used Microsoft Visual Studio Express 2013 and the Hercules-12.sln solution and the server is running Windows. I later tried a build of the latest fresh Hercules and it gave me the same result when I uncommented HPMHooking in confplugins.conf. Am I doing something terribly wrong? or whats really going on?
-
I don't really know if this is the right place to post this, but im having some issues with this feature. Yesterday i updated my server and compiled it as usual without any errors. I might add that i added :
#include "../common/HPMDataCheck.h"
and made sure that it was the last included file:
But when i tried to run my server i got the following errors:
[Warning]: HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for plugin/HPMHooking.dll, most likely not including HPMDataCheck.h, skipping...[Warning]: HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for plugin/custom_plugin.dll, most likely not including HPMDataCheck.h, skipping...
So I checked the code again. I checked both my custom plugin and HPMHooking, and HPMDataCheck.h was indeed included in both of 'em.
When i compiled i used Microsoft Visual Studio Express 2013 and the Hercules-12.sln solution.
Edit: I tried the latest fresh Hercules and it gave me the same result when I uncommented HPMHooking in confplugins.conf. Am I doing something terribly wrong? S:
Edit2; https://github.com/HerculesWS/Hercules/commit/10c160a3317b63a8c59830f836b5adefb788e652 solved it.
-
Hi, i've been trying to figure out how to check if there is a player near a mob. Here is the code im at right now:
int pc_isnear_sub(struct block_list *bl, va_list args){ int* isnear = va_arg(args, int*); struct map_session_data *sd = (struct map_session_data *)bl; if (sd->sc.data[SC_TRICKDEAD] || sd->sc.data[SC_HIDING] || sd->sc.data[SC_CLOAKING] || pc_isinvisible(sd) || sd->vd.class_ == INVISIBLE_CLASS || pc_isdead(sd)) { return 0; } else{ *isnear++; } return 1;}int pc_isnear_mob(struct mob_data *md) { int *isnear = 0; //map->foreachinarea(pc_isnear_sub, md->bl.m, md->bl.x - AREA_SIZE, md->bl.y - AREA_SIZE, md->bl.x + AREA_SIZE, md->bl.y + AREA_SIZE, BL_PC,isnear, isnear); map->foreachinrange((pc_isnear_sub), &md->bl, AREA_SIZE, BL_PC, isnear); if (isnear > 0){ return true; } return false;}
But it seems like pc_isnear_sub isn't even being called, can anyone tell me what im doing wrong? :/
Splitting large plugin into multiple files.
in Plugin Support
Posted · Edited by akka
Hi my plugin project has grown into a huge inconvenient file, so i tried to split it into a number of files. For example i created atcommands.c and atcommands.h
atcommands.h:
atcommands.c
Then in the "main" plugin file with the HPExport functions put this:
Because the original HPMi->addCommand adds "atcommand_" to the beginning of the atcommand name inorder to call it.
and then i just add this as usual:
It all compiles just fine, but the map server crashes and I guess its due to missing symbols. Is what im trying to do even possible? I've looked at numerous plugins but all of 'em seems to consist of a .c file and not header files.