Skip to content

Variable numbers not going over 9.223 Quintillion (IDK if bug or something else) #7209

@somofnut

Description

@somofnut

Skript/Server Version

[Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[Skript] Server Version: git-Paper-496 (MC: 1.20.4)
[Skript] Skript Version: 2.9.3 (skriptlang-github)
[Skript] Installed Skript Addons: 
[Skript]  - skDragon v0.17-alex-MC1.18-hack-4
[Skript]  - SkQuery v4.1.10
[Skript]  - SkBee v3.4.0 (https://github.com/ShaneBeee/SkBee)
[Skript]  - FunkySk v1.0.2
[Skript] Installed dependencies: 
[Skript]  - Vault v1.7.3-b131
[Skript]  - WorldGuard v7.0.9+5934e49

Bug Description

I’ve created a superpower training simulator server on my PC, using the Feather client on Minecraft 1.20.4. However, I’ve run into an issue with stat gains. Whenever any of the stats reach the 64-bit integer limit (around 9.223 quintillion), the number turns negative and won’t increase beyond that limit.

I’m running Windows 11, and I believe it’s a 64-bit version (though I’m not sure of the specific edition). I’m wondering if the issue is related to this, because I haven’t seen others reporting the same problem. This bug only occurs when using later versions of Skript, Like the 2.8 and 2.9 versions. In earlier versions (2.6.x or 2.7.x), I was able to reach numbers as large as 1.79e308, which leads me to believe that something changed in Skript that limits numbers to the maximum value allowed by my PC’s architecture (the 64-bit limit).

Expected Behavior

Previously, in Skript versions 2.6.x or 2.7.x, variables could reach numbers as large as 1.79e308 (the limit of a double-precision floating-point number). However, in the current version, numbers using variables should continue to increment beyond the 64-bit integer limit, without turning negative or being restricted to the 64-bit integer range. The expectation is that the system should handle large numbers properly, similar to how it worked in the earlier Skript versions, where values could exceed the 64-bit integer limit and reach extremely large numbers. As mentioned in the bug description section.

Steps to Reproduce

Really no code is required to be shown as it is with every single variable i use. I can try to send a screenshot.
If screenshot doesnt work, i can explain whats on the picture as steps to reproduce are just to add a huge number to another huge number to achieve the -9.223 Qi stuff. The screenshot shows red text saying "+-9.22Qi Strength".

Errors or Screenshots

image

Other

I hope i explained everything as much as i could, as this is my first time writing a report for skript.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.completedThe issue has been fully resolved and the change will be in the next Skript update.patch-readyA PR/issue that has been approved and is ready to be merged/closed for the next patch version.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions