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

I don't even know what to say #374

Open
TesteTheTestCat opened this issue Sep 6, 2023 · 3 comments
Open

I don't even know what to say #374

TesteTheTestCat opened this issue Sep 6, 2023 · 3 comments

Comments

@TesteTheTestCat
Copy link

heres the images.
Image 1
Image 2
Image 3

@dan-simon
Copy link
Collaborator

What decimal library are you using? I suspect this might be due to using decimal.js (https://github.com/MikeMcl/decimal.js) rather than break-infinity.js (https://github.com/patashu/break_infinity.js). This library is only compatible with https://github.com/patashu/break_infinity.js. From what I see of your game, you can probably switch to break_infinity.js, but I've offered some information below if not.

Generally, for most incremental games, I would recommend break-infinity.js over decimal.js due to decimal.js storing a lot of precision, more than is needed for incremental games, making calculations very slow. However, if for some reason your game has a mechanic requiring use of decimal.js, you'll need to convert numbers to break-infinity.js decimals before formatting them. I can try to help on this if that's the issue.

Alternatively, if you're using another big number library like ExpantaNum, this notation library unfortunately still won't work with that, and it may be unable to handle numbers that big even with workarounds.

@dan-simon
Copy link
Collaborator

(It could also be some other issue, but it would help to have an attached copy of script.js rather than just an image because I don't want to type it out to try reproducing, and also copies of or sources for any other files you use. script.js looks to me like it should run and certainly shouldn't lead to this error on its own, for what that's worth.)

@TesteTheTestCat
Copy link
Author

What decimal library are you using? I suspect this might be due to using decimal.js (https://github.com/MikeMcl/decimal.js) rather than break-infinity.js (https://github.com/patashu/break_infinity.js). This library is only compatible with https://github.com/patashu/break_infinity.js. From what I see of your game, you can probably switch to break_infinity.js, but I've offered some information below if not.

Generally, for most incremental games, I would recommend break-infinity.js over decimal.js due to decimal.js storing a lot of precision, more than is needed for incremental games, making calculations very slow. However, if for some reason your game has a mechanic requiring use of decimal.js, you'll need to convert numbers to break-infinity.js decimals before formatting them. I can try to help on this if that's the issue.

Alternatively, if you're using another big number library like ExpantaNum, this notation library unfortunately still won't work with that, and it may be unable to handle numbers that big even with workarounds.

ah flip im using break_eternity.js

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

No branches or pull requests

2 participants