error
You might be looking for the "Error" function, which has the same name as this function.
Example
Calling an custom error that doesn't actually exist.
Output: [my_addon] addons/my_addon/lua/autorun/my_code.lua:1: Because I wanted!
1. error - [C]:-1
2. unknown - addons/my_addon/lua/autorun/my_code.lua:1
Example
Shows what a low level (0
) error looks like.
Output: [my_addon] It isn't important
1. error - [C]:-1
2. unknown - addons/my_addon/lua/autorun/my_code.lua:1
Example
Shows what a high level (1
) error looks like.
Output: [my_addon] addons/my_addon/lua/autorun/my_code.lua:1: I'M VERY IMPORTANT!!!
1. error - [C]:-1
2. unknown - addons/my_addon/lua/autorun/my_code.lua:1