#daily streak
1 messages · Page 1 of 1 (latest)
I believe this will be day of the year
Then just save the output of that to an int variable when they join if the current value+1 =the date
Yw
Divide by 86400
This will be the exact amount of days since Thursday, Janurary 1st, 1970, 12:00am GMT
@broken ice
You can set a cloud variable to this value at 30hz
when the value changes, its been a day
What’s the difference between modulo and divide?
Divide (/) finds the number of times one thing can fit in to another. Modulo (%) is the remainder after division. 30 / 4 = 7.5. However: 30 % 4 = 2. Basically, the leftover decimal from division result (0.5), multiplied by the divisor (4) equals the modulo/modulus value (2).
In this particular instance, you want to divide. Why? Because you are attempting to figure out how many days have elapsed since Jan 1, 1970. You are not looking for the remainder of a day left, which is what modulo would provide. 86400 seconds = 60 (seconds in a minute) * 60 (minutes in an hour) * 24 (hours in a day). So you are trying to find out how many 86400 parts (days) fit in the total elapsed time since Jan 1, 1970, therefore you divide.
Ah ok mb
I thought modulo was the same as divide just it didn’t show decimals
So like 10.2 would be 10
too bad Modulo isnt real modulo
what we have as Modulo is actually Remainder
You know this because mod(-1,5) = -1 and not 4
Yeah, the description does say remainder. In the event of negatives, you’d need to add a some chips for accurate modulus behavior.
I know but its just annoying