08-22-2013, 05:54 AM
Sounds good. Core is all done

Poll: Change the API? You do not have permission to vote in this poll. |
|||
Yes, break all the plugins | 6 | 85.71% | |
No, keep it as is | 1 | 14.29% | |
Total | 7 vote(s) | 100% |
* You voted for this item. | [Show Results] |
API change in hook-adding
|
||||||
08-22-2013, 05:54 AM
Sounds good. Core is all done
![]()
I don't like polluting the global namespace so much. The hooks are used so rarely that it's not worth the few saved keystrokes.
What is more intriguing is (yet another) function signature:
For some reason I can't add hooks. I get these errors:
Code: [12:29:30] Plugin WorldEdit wants to add a hook (19), but it doesn't provide the callback function "OnPlayerBreakingBlock" for it. The plugin need not work properly.
08-22-2013, 09:42 PM
And those functions, SelectFirstPointHook etc, are they defined?
08-22-2013, 11:27 PM
Yes. They are in a different .lua file but they exist.
08-22-2013, 11:33 PM
Hmm, strange. Since the initialize function is called after everything has been loaded, the functions should be available as globals. They're not local, are they?
08-22-2013, 11:41 PM
The weird thing is that the server still searches for a function with the same name as before the API change
(HOOK_PLAYER_BREAKING_BLOCK and OnPlayerBreakingBlock) but when the server calls the hook it calls the function I said it should use (HOOK_PLAYER_BREAKING_BLOCK and SelectFirstPointHook)
08-22-2013, 11:43 PM
Oh, that might be the cause, the leftover code for hook function existence is based on the old API. I'll fix this later in the evening when I get home. I thought the old-named functions were called instead.
Thanks given by: NiLSPACE
Or not. I tried calling AddHook(cPluginManager.HOOK_CHAT, HookChat) with a HookChat function defined, and everything worked fine.
Could you send your plugin to me? I think I've fixed it. Try it now.
10-20-2013, 11:26 PM
You broke all plugins with that. Some of my plugins are not working, SignLock is not working, MCServer says it fix the call but plugins dont work.
| ||||||
« Next Oldest | Next Newest »
|