How to check every time a number passed 10 times?

Example:
I want to check every time the in-game days passed 10 times.
So 10 days, 20 days, 30 days and so on.

How can I do that?
Thanks for the help…

You can use modulus.

day = 5

if (day % 10) == 0 then
    -- no
end

day = 20

if (day % 10) == 0 then
    -- yes
end

day = 12

if (day % 10) == 0 then
    -- no
end
1 Like

Yeah, knnew it had something to do with modulus, just didn’t know how to use it.
gonna learn about it! thanks

1 Like

Modulus is basically the remainder after dividing the two numbers (i think?).

1 Like

You thought correct. Extra characters

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.