Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs

Having problem with ingame clock


I was creating an in-game clock where for every minute, an hour passes. This is the code:

class timeSpan:

def __init__ (self, waitTime): self.waitTime = waitTime self.currentTime def ready (self): if currentTime + waitTime <= currentTime += waitTime return True return False

class clock:
timer = timeSpan(1)
minutes = 0
hours = 0
days = 0
def tick:
if timer.ready():
minutes += 1
if not(minutes %= 60):
if not(hours %= 24):
days += 1

However, the computer said that
was invalid syntax. Could you please help me with this problem?

1 year ago