Error() command info about levels

Wasn’t sure where to put this.

I couldn’t find any documentation on the roblox creator website about what the different levels are and what they change about the way error() does its job.

image

This command

thanks

3 Likes

error() is a way to throw an error in a failure situation, along with an explanation. It goes without saying that it terminates functions.

The levels provide a way to manage the additional information that accompanies an error message - position or level of the error.

error("OFF", 0) --> pure message without positional info

Perhaps taking a look at a set functions might help with understanding.

LEVEL: 1 → line 4

Where the error was called (inside the Yolk).

LEVEL: 2 → line 8

Where Yolk was called. This level is default as well.

LEVEL: 3 → line 12

Where EggWhite was called.

LEVEL: 4 → line 15

Where Eggshell was called.

Any level beyond the script environment will result in a pure message (like with level 0).


P.S.: The profiles that like posts in series but have no activity are often bots or on some occasions newcomers. Also, #help-and-feedback:scripting-support better suits this question. Anyways, hopefully this helps!

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.