Markervision: Fixed null entity error#1835
Merged
TimGoll merged 2 commits intoTTT-2:masterfrom Aug 22, 2025
Merged
Conversation
Contributor
|
Shouldn't line 108 be RemoveEFlag? It doesn't make sense to AddEFlag in the .Add method and .Add it again in the .Remove |
Contributor
Author
Makes sense, I adjusted/tested it and it still works fine without any errors. |
TimGoll
pushed a commit
that referenced
this pull request
Sep 15, 2025
This PR fixes the following error:
```
[REDACTED] Lua Error:
[TTT2 (Base) - v0.14.5b] lua/ttt2/libraries/marker_vision.lua:54: Tried to use a NULL entity!
1. AddEFlags - [C]:-1
2. Add - lua/ttt2/libraries/marker_vision.lua:54
3. callback - lua/ttt2/libraries/marker_vision.lua:230
4. func - lua/ttt2/extensions/net.lua:206
5. unknown - lua/includes/extensions/net.lua:34
```
The null entity error was introduced in
#1825 .
I tested it and I couldn't reproduce the above error again.
(I fixed a similar error in the following PR but I didn't notice the
other error: #1835 )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #1834 .
The null entity error was introduced in #1825 .
I tested it and I couldn't reproduce the error from the above issue again.
Error reason:
markerVision.Remove is called twice.
The first time ent is valid but the second time it's a null entity and that caused the error.