Global lump sum += 1
change into
Global one-time total
Total at one time += 1
Separate the use of family variables from calculation operations in declarations.
If your problem is solved, please adopt it!
If it is not solved, please continue to ask questions.