Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    Decimal Counting Bug

    Feedback
    3
    4
    134
    Loading More Posts
    • 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.
    • The_True_Odst
      The True ODST Best Forum Helpers last edited by The_True_Odst

      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?

      ODST: Orbital Drop Ship Trooper
      (Halo Reference)

      Tyller_ 1 Reply Last reply Reply Quote 1
      • Tyller_
        Tyller_ Best Forum Helpers @The_True_Odst last edited by

        @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>

        The_True_Odst 1 Reply Last reply Reply Quote 1
        • The_True_Odst
          The True ODST Best Forum Helpers @Tyller_ last edited by

          @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

          ODST: Orbital Drop Ship Trooper
          (Halo Reference)

          info-creaticode 1 Reply Last reply Reply Quote 1
          • info-creaticode
            CreatiCode @The_True_Odst last edited by

            @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 Reply Quote 1
            • First post
              Last post