💬

Community answer

Collected from the ACE community Discord archive around 2019-10-20. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

ent:isValid() errors on null entities

🌙 LuaUpdated 2 days ago•0 views
isValid itself can error on a null/NULL entity pointer - guard with a plain `if ent` / IsValid-style check before calling methods, or wrap in pcall.

Why does ent:isValid() throw an error when the entity is null

isValid itself can error on a null/NULL entity pointer - guard with a plain `if ent` / IsValid-style check before calling methods, or wrap in pcall.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.