[Python] score += collision is submitted as a TypeError [closed]

Discussão em 'Python' iniciado por Stack, Dezembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    I was running Python 3.12.6 and using Tkinter. I noticed an error about the Tkinter file, saying it had an unknown command or something. That wasn't my fault.

    However, when I tried to set a variable called score to a function called collision(), using the += command, it said this:

    Traceback (most recent call last):
    >! File "/Users/HIDDEN/Documents/Bubble Blaster.py", line 130, in <module>
    score += collision()
    TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'


    Can someone explain why this issue is happening, even without Python knowledge? Your input is valuable!

    Continue reading...

Compartilhe esta Página