e0706 0 Posted November 13, 2015 (edited) int my_pc_delitem_pre(struct map_session_data *sd,int n,int amount,int type, short reason, e_log_pick_type log_type) { my_pc_delitem_storage = 0; ShowError("!!!!! %d !!!!!n", n); return 1; } output is !!!!! 162561 !!!!! item count is 3 in inventory. how fix it? sorry, i bad eng... Edited November 13, 2015 by e0706 Quote Share this post Link to post Share on other sites
0 Aeromesi 180 Posted November 13, 2015 @@Dastgir @@4144 Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted November 13, 2015 @@Aeromesi, next time mention my name lol @@e0706, I have same problem long time ago http://herc.ws/board/topic/7108-hpm-hooking-return-random-value-from-the-defined-function/ all the value has to add start (*) symbol int my_pc_delitem_pre(struct map_session_data *sd,int *n,int *amount,int *type, short *reason, e_log_pick_type *log_type)then also retrieve them with the (*) symbolShowDebug( "%d", *amount ); Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted November 13, 2015 Explanation: All parameter (in function) for Plugins are pointers, so with pointers, one can change data and that will be changed in original function too. Quote Share this post Link to post Share on other sites
Share this post
Link to post
Share on other sites