Is there any way to error() without it showing up in the log?

I want to use error() for its utility of stopping the entire thread, but then it would be filling the log whenever it was used. Is there any way to prevent this?
And is this cpu intensive or not? So you can theoretically use this in place of a simple if statement instead when you want a function to end the thread

The line return ends a thread and can return data to wherever the function was called. In your case, you would not have to return anything in particular.

then you are stopping the functions thread, not the thread from the place that called the function, that is what I want. An error ends all threads and that’s the effect I want

Could you use a coroutine and yield it?

I was doing that, but I just assumed that’d mean the thread would be taking up memory forever so I wanted to come up with another solution

It is garbage collected when the function containing it ends. Just like all memory referenced inside functions.

Also you can just do this if you don’t want to use a coroutine.



well that solves my problem, thanks!