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

Number Formatting #7015

Open
1 task done
CerialPvP opened this issue Aug 30, 2024 · 4 comments
Open
1 task done

Number Formatting #7015

CerialPvP opened this issue Aug 30, 2024 · 4 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. up for debate When the decision is yet to be debated on the issue in question

Comments

@CerialPvP
Copy link

CerialPvP commented Aug 30, 2024

Suggestion

Basically, make it so you can specify numbers with underscores.
Example: set {_n} to 10_000, give player 1_024 of barrier

Why?

  1. Most programming languages, such as Python and Java, already have this feature.
  2. For big numbers, it is a pain to write them out and count the length to make sure the number is correct and that we didn't enter a high number.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Aug 30, 2024
@APickledWalrus
Copy link
Member

I think we should prefer commas if possible, e.g. give player 1,024 of barrier. This would break some existing list parsing, e.g. set {_list::*} to 1,100, but that is already confusing code imo

@sovdeeth
Copy link
Member

I think that's pretty dangerous, especially with things like functions. It's very common to write location(1,104,188.3) for example

@APickledWalrus
Copy link
Member

APickledWalrus commented Aug 30, 2024

yeah that's fair. it's probably more common than i'm thinking

@UnderscoreTud UnderscoreTud added the up for debate When the decision is yet to be debated on the issue in question label Aug 31, 2024
@Mwexim
Copy link
Contributor

Mwexim commented Sep 1, 2024

Also note some European countries use comma to denote decimals (where, for example, the US uses the '.'), adding more to the confusion.

I think this is a no-brainer. Super easy to add and does a lot for readability (the version with the underscore of course).

@Efnilite Efnilite added the PR available Issues which have a yet-to-be merged PR resolving it label Sep 8, 2024
@Efnilite Efnilite added completed The issue has been fully resolved and the change will be in the next Skript update. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. up for debate When the decision is yet to be debated on the issue in question
Projects
None yet
Development

No branches or pull requests

6 participants