My python function won't return or update the value

前端 未结 3 572
不思量自难忘°
不思量自难忘° 2021-01-21 12:17
def getMove(win,playerX,playerY):

    #Define variables.
    movePos = 75
    moveNeg = -75
    running = 1

    #Run while loop constantly to update mouse\'s coordinat         


        
3条回答
  •  不知归路
    2021-01-21 12:57

    You should explicitly reassign these variables when you call getMove():

    playerX, playerY = getMove(win, playerX, playerY)
    

    Hope this helps!

提交回复
热议问题