Nitrox icon indicating copy to clipboard operation
Nitrox copied to clipboard

[WIP] Add status codes to nitrox server console

Open OhmV-IR opened this issue 1 year ago • 9 comments

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

OhmV-IR avatar Jan 16 '24 23:01 OhmV-IR

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 avatar Jan 17 '24 00:01 tornac1234

@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

OhmV-IR avatar Jan 17 '24 03:01 OhmV-IR

Make sure to create a proper branch on your Nitrox fork, it's not recommended to commit on the master branch directly

dartasen avatar Jan 17 '24 11:01 dartasen

I believe if we were to make Error Codes an Enum would work See Here

killzoms avatar Jan 17 '24 12:01 killzoms

@dartasen branches have been created 👍

OhmV-IR avatar Jan 17 '24 13:01 OhmV-IR

@killzoms I've updated my inDev branch on the forked repo with your suggestion

OhmV-IR avatar Jan 17 '24 21:01 OhmV-IR

Enum does have a ToString overload that takes a format, said format can cause either a base 10 number, Hexadecimal, or a strung

killzoms avatar Jan 17 '24 21:01 killzoms

Miss click my apologies.

killzoms avatar Jan 17 '24 21:01 killzoms

Anyways, as i was about to say, These are the formats supported by the Enum type

killzoms avatar Jan 17 '24 21:01 killzoms

reopening PR with merge from polishing-status-codes, not master

OhmV-IR avatar Feb 22 '24 13:02 OhmV-IR