Currently, every failure of the FiveM server returns an exit code of 1.
This can cause problems for when we want to auto restart the server.
For example, the manager restarts the server after an exit code of 1. But because we don’t know if the problem was a license failure, segmentation fault or just a script problem (common), the server might keep crashing just wasting system resources.
Something like this might work:
0: Normal Exit
1: Unknown Error
2: Invalid License
3: C++ Exceptions (CURL?)
4: Critical script errors (Mono, Lua and Node)