Skip to content

Markervision: Fixed null entity error#1835

Merged
TimGoll merged 2 commits intoTTT-2:masterfrom
mexikoedi:markervision-error-fix
Aug 22, 2025
Merged

Markervision: Fixed null entity error#1835
TimGoll merged 2 commits intoTTT-2:masterfrom
mexikoedi:markervision-error-fix

Conversation

@mexikoedi
Copy link
Copy Markdown
Contributor

@mexikoedi mexikoedi commented Aug 21, 2025

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.

@EntranceJew
Copy link
Copy Markdown
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

@mexikoedi
Copy link
Copy Markdown
Contributor Author

Shouldn't line 108 be RemoveEFlag? It doesn't make sense to AddEFlag in the .Add method and .Add it again in the .Remove

Makes sense, I adjusted/tested it and it still works fine without any errors.

Copy link
Copy Markdown
Member

@TimGoll TimGoll left a comment

Choose a reason for hiding this comment

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

Thank you!

@TimGoll TimGoll merged commit d92d83e into TTT-2:master Aug 22, 2025
4 checks passed
@mexikoedi mexikoedi deleted the markervision-error-fix branch August 22, 2025 14:13
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 )
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.

Marker Visions cause error on removal

3 participants