Ulysses

General => Developers Corner => Topic started by: Buzzkill on February 22, 2015, 09:35:41 AM

Title: Hook count limit?
Post by: Buzzkill on February 22, 2015, 09:35:41 AM
Is there a hook limit either in ULib or GMod itself?  I asked because I'm seeing the following:

1)  Server operates fine.
2)  I add a new addon (specifically, a reporting system which includes a hook to PlayerInitialSpawn, though I have no reason to currently believe there's anything specifically wrong with the addon)
3) I observe that other hooks no longer run (specifically, PatchProtect's hook to PlayerInitialSpawn)
4) If I rem out the hook in the reporting system, PatchProtect works again.

This leaves me thinking that I've pushed past some kind of threshold for hooks, perhaps in general or perhaps specifically around PlayerInitialSpawn.

I run a *lot* of addons (148 at last count).

Thanks,
Mike

Title: Re: Hook count limit?
Post by: Bytewave on February 22, 2015, 11:13:39 AM
Either there are too many hooks, or there are non-unique identifiers set for your hooks—they attempt to override each other, and fall flat.
Title: Re: Hook count limit?
Post by: MrPresident on February 22, 2015, 01:18:54 PM
While I could be wrong, I've never heard of there being a hook limit in gmod.

More likely what you have going on is either conflicting hooks like Bytewave suggested or a hook that is returning improperly.
Title: Re: Hook count limit?
Post by: Neku on February 22, 2015, 01:23:00 PM
While I could be wrong, I've never heard of there being a hook limit in gmod.

More likely what you have going on is either conflicting hooks like Bytewave suggested or a hook that is returning improperly.

It is most likely conflicting hooks, as two separate addons are affected.
Title: Re: Hook count limit?
Post by: Bite That Apple on February 22, 2015, 11:01:35 PM
What is the addon? Basically, all it needs is for all the hook names to be changed to something else
Title: Re: Hook count limit?
Post by: Buzzkill on February 23, 2015, 07:09:51 AM
Thanks guys.  The problem was squarely between my ears.  I had two copies of the addon -- one that I was actively working on and a copy that I thought I had moved into my OFF folder but actually hadn't. They were conflicting and causing mayhem.