Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Feedback
  3. Decimal Counting Bug

Decimal Counting Bug

Scheduled Pinned Locked Moved Feedback
4 Posts 3 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TheNicknameGovT Offline
    TheNicknameGovT Offline
    TheNicknameGov
    trusted helpers
    wrote on last edited by TNG
    #1

    I don’t know how to explain it, but when I there’s a decimal that goes up, there’s a chance that there will be a digit at the very end that counts:

    2304dea3-f2cc-4f3d-9e3c-8a07bd24e18d-Screenrecording2025-04-099.04.14AM-ezgif.com-video-to-gif-converter.gif

    How do I fix this?

    I'm back!!!

    Tyller_T 1 Reply Last reply
    1
    • TheNicknameGovT TheNicknameGov

      I don’t know how to explain it, but when I there’s a decimal that goes up, there’s a chance that there will be a digit at the very end that counts:

      2304dea3-f2cc-4f3d-9e3c-8a07bd24e18d-Screenrecording2025-04-099.04.14AM-ezgif.com-video-to-gif-converter.gif

      How do I fix this?

      Tyller_T Offline
      Tyller_T Offline
      Tyller_
      trusted helpers
      wrote on last edited by
      #2

      @the_true_odst This is impossible to fix, the issue is with floats which are known to do this. The only fix I’ve every thought of to this would be to make it so that the real value has it so at 1 it’s stored as 100 so at 0.01 its stored as 1 and will accurately go up as such

      <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
      </div>

      TheNicknameGovT 1 Reply Last reply
      1
      • Tyller_T Tyller_

        @the_true_odst This is impossible to fix, the issue is with floats which are known to do this. The only fix I’ve every thought of to this would be to make it so that the real value has it so at 1 it’s stored as 100 so at 0.01 its stored as 1 and will accurately go up as such

        TheNicknameGovT Offline
        TheNicknameGovT Offline
        TheNicknameGov
        trusted helpers
        wrote on last edited by
        #3

        @tyller_ I think I understand what you said.
        I added a money storage variable so it doesn’t glitch out:
        acbcd5a5-fcf4-4b72-b77c-d36700614fc0-image.png

        I'm back!!!

        CreatiCodeI 1 Reply Last reply
        1
        • TheNicknameGovT TheNicknameGov

          @tyller_ I think I understand what you said.
          I added a money storage variable so it doesn’t glitch out:
          acbcd5a5-fcf4-4b72-b77c-d36700614fc0-image.png

          CreatiCodeI Offline
          CreatiCodeI Offline
          CreatiCode
          wrote on last edited by
          #4

          @the_true_odst

          Another way is to scale it up by 100, round to integers (so get rid of the tiny noise value), then divide it by 100:

          b83d4c75-c4be-427c-9a71-a46c1565016d-image.png

          1 Reply Last reply
          1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • CreatiCode