I get the error
[Scripting][error]-Error: Failed to call function 'hasTag' at <anonymous> (test/test/main.js:87)
when an entity dies or is unloaded and my script is still trying to check it.
this is the code:
if (entity && !entity?.hasTag("test_hasbounced")) {...}
and I've tried a bunch of stuff to make sure the entity exists before the if statement checks its tags, but it's still not working. how can i make sure the tag is only checked if it won't throw an error to check it?
#Check if entity exists before checking its tags?
1 messages · Page 1 of 1 (latest)
entity.isValid()
2.0.0-beta: entity.isValid