I’m looking for a way to hide/limit what is outputted through the error function; in other words, I do not want to reveal which function called the error function. I’ve tried modifying the function levels, but this does not work - I’m pretty sure the level only shows the level of detail in the error message itself, if not i don’t know what’s happening, since no matter the level I put in I get the same call stack text (blue text).
I’ve found a method which uses xpcall and string.gsub, but this only returns a value usable with print - trying to error with it shows a new callstack.
If anyone has any ideas on how I could do this I would appreciate it. I’m not quite sure how to go about it.
Hey, thanks for the reply, but the idea is it should also limit the call stack which is shown from error() in the Roblox game client, so as to limit what is shown in the Developer Console. I appreciate the method to hide it in Studio though, I didn’t know that.