Nitrox
Nitrox copied to clipboard
[WIP] Add status codes to nitrox server console
Ideally, status codes should be able to be googled in the docs to allow people to troubleshoot themselves without looking at the code or asking in the discord. Realistically, most people will still ask in the discord :{. This is a WORK IN PROGRESS, and the pull request will be marked as ready to be reviewed when it is ready. If you would like to contact me about this PR, add me on discord "ohmvir" <- no quotation marks. My DMs are closed so you will have to wait for me to accept your friend request
Example of how it would look like:
The server failed to start
Status code = 5
On website: Status code 5 is caused due to Nitrox not having sufficient permissions to access a file. Please ensure that Nitrox is run as an administrator and try again
If we were to implement this kind of thing, we'd likely have a static function somewhere returning the concatenation of the const string "Status code " (variable somewhere) and the filled number.
@tornac1234 Yes of course its much easier to use a variable, was just testing stuff for how you print to console and made a commit so that I could open this PR
Make sure to create a proper branch on your Nitrox fork, it's not recommended to commit on the master branch directly
I believe if we were to make Error Codes an Enum would work See Here
@dartasen branches have been created 👍
@killzoms I've updated my inDev branch on the forked repo with your suggestion
Enum does have a ToString overload that takes a format, said format can cause either a base 10 number, Hexadecimal, or a strung
Miss click my apologies.
Anyways, as i was about to say, These are the formats supported by the Enum type
reopening PR with merge from polishing-status-codes, not master