我在第17行发生错误,在pointsPlus点中+ = 1 * mult TypeError:+ =不受支持的操作数类型:“事件”和“整数”

我一直在控制台中获取它,这是什么意思!?

  

文件“ C:/Users/deus2/PycharmProjects/Testing/ClickerGame.py”,第17行   在pointsplus中        点+ = 1 * mult

     

TypeError:+ =:'事件'和'整数'的不受支持的操作数类型

@Override
protected void configure(HttpSecurity http) throws Exception {
    http.sessionmanagement()
        .sessionCreationPolicy(SessionCreationPolicy.STATELESS);
}
shimin_3333 回答:我在第17行发生错误,在pointsPlus点中+ = 1 * mult TypeError:+ =不受支持的操作数类型:“事件”和“整数”

此代码应该有效

from tkinter import *

main = Tk()
frame = Frame(main,width = 500,height = 575)

points = 0
mult = 1

pointsLabel = Label(main,text = points)
pointsLabel.pack()

def pointsPlus():
    global points  # assuming you want to modify global parameter here
    points += 1*mult
    pointsLabel()
    pointsLabel.update()


frame.bind('<Button-1>',pointsPlus)
frame.pack()

main.mainloop()
本文链接:https://www.f2er.com/2889103.html

大家都在问