Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some code runs when plugin is disabled. #120

Merged
merged 4 commits into from
May 16, 2024

Conversation

HotoCocoaco
Copy link
Contributor

I was getting errors like when randomizer_enabled is 0. There are no g_bEnabled check for these functions or even more. I have fixed the cases that I encountered.

L 05/14/2024 - 23:37:42: [SM] Exception reported: Exceeded array limit on storing class, enable randomizer_debug and try again for more infos
L 05/14/2024 - 23:37:42: [SM] Blaming: randomizer.smx
L 05/14/2024 - 23:37:42: [SM] Call stack trace:
L 05/14/2024 - 23:37:42: [SM]   [0] ThrowError
L 05/14/2024 - 23:37:42: [SM]   [1] Line 923, randomizer.sp::SetClientClass
L 05/14/2024 - 23:37:42: [SM]   [2] Line 822, randomizer.sp::Console_EurekaTeleport
L 05/12/2024 - 15:26:07: [SM] Exception reported: Entity -1 (-1) is invalid
L 05/12/2024 - 15:26:07: [SM] Blaming: randomizer.smx
L 05/12/2024 - 15:26:07: [SM] Call stack trace:
L 05/12/2024 - 15:26:07: [SM]   [0] GetEntProp
L 05/12/2024 - 15:26:07: [SM]   [1] Line 539, randomizer.sp::OnGameFrame

edit: add more g_bEnabled check.

Copy link
Owner

@FortyTwoFortyTwo FortyTwoFortyTwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the checks in dhook.sp and sdkhook.sp is unneeded as plugin already handles unhooking on disable, but randomizer.sp and event.sp does indeed have missing checks.

@FortyTwoFortyTwo FortyTwoFortyTwo merged commit 8387a94 into FortyTwoFortyTwo:master May 16, 2024
1 check passed
@HotoCocoaco HotoCocoaco deleted the small-fix branch May 16, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants