Timers being the bane of my existence, part 4 of Infinity

floating point error, 7.5 will become 7.000000000000000005
*guys, im in middle so is this what it means?)

3 Likes

I’m using the “Seconds in Game” block, so I can’t just reset it every 60 seconds. Unless…

Annoyingly hard block code time!

you can make a var and when == 60
set to 0

( i know this is another var, but it works…)

1 Like

@ClicClac ima experiment for a sec

Edit: thats not right.

SMART!
I was thinking that the if statment was wrong, but couldn’t see why, and i just kinda forgot about it.

1 Like

Ok! Great news! @hill_sawyer and @Epi320, you two didn’t have exactly what I did, but it works now!

Mostly.

The minute part of the timer doesn’t start at 0 for some reason. It starts at 14, and after a whole minute of timing, it then turns to 0. The floating point error is gone. Help? [1]


  1. If you need to see the block code, I can provide a picture. ↩︎

What is your block code?

One second.

ik nothing about blocks… but I wish u good luck and hope u fix your issue :heart:

Besides having a million digits, is the timer roughly okay or is it completely different

I got rid of the floating point error. The minutes spent racing is messed up now though.

1 Like

What’s the “create text with” on “modddular” for?

At the top? It’s to prevent a block code error.

Maybe use KingDDD to find the minutes since game start.

1 Like

what if you just set king ddd to 0?

That would tell the timer system that the amount of time that has passed since the beginning of the game would be equal to 0. Also related, does anyone have a link to a general mod function in GKC?

1 Like

Here

1 Like

So that solution would be X mod Y?

I believe so.

1 Like