Python脚本在下载的脚本上出现无效语法错误

2024-09-30 01:21:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我想试试GameStateIntegration的脚本

def sendHealthStatus(health): # Send health status to arduino
  if health == 100:
    arduino.write('h')
    arduino.write(str(health))
  if health < 100 and >= 10:
    arduino.write('h0')
    arduino.write(str(health))
  if health < 10 and >= 0:
    arduino.write('h00')
    arduino.write(str(health))`

但是我得到了一个无效的语法

if health < 100 and >= 10:

事实上,当我删除“=”符号时,它告诉我“>;”就是错误

那剧本怎么了?你知道吗

来自德国的问候 比约恩


Tags: andto脚本sendifdefstatusarduino

热门问题