I am about to write my first plugin. After reading over the documentation, I decided to try and be creative with the syntax for setting hooks, because I felt like the "official" recommended way was going to be really difficult for me to read and follow. So I tried setting hooks this way, outside of the Initialize function and using anonymous functions for the function argument, and behold, it works
One thing I noticed was that code outside of any function runs before the Initialize function is called. So I'm wondering, are there any negative side effects to connecting these events before the plugin has been technically initialized?
Screenshot:
One thing I noticed was that code outside of any function runs before the Initialize function is called. So I'm wondering, are there any negative side effects to connecting these events before the plugin has been technically initialized?