def updatedcollisions(self):
self.xcord, self.ycord = pygame.mouse.get_pos()
if self.confirmationscreen == True:
if self.xcord < 150 or self.xcord > 650 and self.ycord < 200 or self.ycord > 700:
print('Out of Screen')
self.confirmationscreen = False
pygame.Surface.fill(self.win,('black'))
self.loadonce()
self.buttons()
self.font = pygame.font.Font(r'D:\Games\First Game\FreeSans\FreeSansBold.ttf',28)
self.text = self.font.render(f'Multiplier {self.moneyperclick}', True, (255,255,255))
self.textRect = self.text.get_rect()
self.textRect.center = (self.width//2, 150)
pygame.draw.rect(self.win,(0,0,0),self.textRect)
self.win.blit(self.text, self.textRect)
else:
if 300 <= self.xcord <= 400 and 600 <= self.ycord <= 700:
self.win.blit(self.whiteboard,[(self.width/2)-150,(self.height/2)-200])
self.multiplier()
self.confirmation()
elif 150 <=self.xcord <= 250 and 600 <= self.ycord <=700:
print('Worked')
self.money = self.money - self.moneyperclick
pygame.display.update()
else:
self.whiteboardfiller()
self.updatedcollisions()
self.moneytracker()
self.money = round(self.money,2)
self.changingtextstuff(f'Whiteboards {self.money}')
I did some research and found that it means that it is looping through something but I don't understand why it isn't able to process this. Error message also says if type(random) is BuiltInMethod or type(getrandbits) is Method:. If anyone could help that would be awesome.
Full code is here.
self.updatedcollisions()- the method calls itself. There doesn't seem to be anything in this method which would change any of the variables so that the conditions wouldn't be the same again, so it will call itself again, and so on infinitely.