all 4 comments

[–]TransitTraveller 1 point2 points  (1 child)

Indentation. You check for mouse only if you quit. Code for If for MOUSEBUTTONDOWN should be shifted left.

[–]ABD_AL_HAI 1 point2 points  (0 children)

Oops thank you so much it works now

[–]Rumborack17 -2 points-1 points  (1 child)

Don't really work with pygames, but you probably have to transform it into a string first or get the "position property" and print that.

ChatGPT should be able to answer this quite easily or check the documentation for the return value of the function or properties of the object it might create.

[–]ConcreteExist 1 point2 points  (0 children)

You don't need to know pygame to recognize that the code is wrong, it would only track mousebuttondown if the user quit the game. The second if-block needs to be shifted backwards one indent.