Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add status codes to nitrox server console #2110

Closed
wants to merge 2 commits into from

Conversation

OhmV-IR
Copy link

@OhmV-IR OhmV-IR commented Jan 16, 2024

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

@tornac1234
Copy link
Collaborator

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.

@OhmV-IR
Copy link
Author

OhmV-IR commented Jan 17, 2024

@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

@dartasen
Copy link
Member

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

@killzoms
Copy link
Collaborator

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

@OhmV-IR
Copy link
Author

OhmV-IR commented Jan 17, 2024

@dartasen branches have been created 👍

@OhmV-IR
Copy link
Author

OhmV-IR commented Jan 17, 2024

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

@killzoms
Copy link
Collaborator

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

@killzoms killzoms closed this Jan 17, 2024
@killzoms killzoms reopened this Jan 17, 2024
@killzoms
Copy link
Collaborator

Miss click my apologies.

@killzoms
Copy link
Collaborator

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

@OhmV-IR
Copy link
Author

OhmV-IR commented Feb 22, 2024

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

@OhmV-IR OhmV-IR closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants