A little explanation plz, and maby a short example of use :)
I have seen theese constants in other plugins, but i miss to se their general purpose.....so could someone plz help me out with a little explanation on them.....
PLUGIN_CONTINUE PLUGIN_HANDLED PLUGIN_HANDLED_MAIN Thanks in advance :) /Lone Wolf |
Quote:
|
Thanks that help a bit but still a little confused......
Ill try an eksample: Code:
Is that understood the right way ? |
No.
When you use return it will exit the whole function. Its just if you use return PLUGIN_HANDLED in register_event() no other plugin below yours will be able to use the event but if you use return PLUGIN_CONTINUE it will still allow all other plugins to use the event. To exit an if statement early it is 'exit' . To exit a switch() early it is 'break' to exit a loop, could be a for loop or while loop, you use 'exit'. To stop the rest of the code for that iteration of the loop you use 'continue'. |
A little correction: "message", not "event". Event can't be blocked because it's already occured. While message which triggers an event can be blocked.
|
Quote:
|
| All times are GMT -4. The time now is 05:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.