Please don't get upset I am reading your replies, I am just trying to explain why I don't think what you are saying will work and in this I have been quite humble in saying that hey that might be my fault. I do appreciate the time and effort you are putting into replying.

But to respond: previous score is not the score when a life was last awarded
So:
Every time any points are scored (1, 10, 20 etc..) it calls addScore( points )

Which does

prevScore = global.score
global.score += points

if(the offending condition):
  awardExtralife

That is called every time 'any' points are awarded, so prevScore tracks one point award behind global.score

So the check is to track a score as it increases and add an extra life everytime it goes over a factor of global.extraLifeEvery (100, 200, 300, 400 etc.)

If that doesn't make any more sense then please don't get stressed over it. The problem is solved and the actual routine improved so all is good.

Okay, no problem. But you can save the previous score when you add the life, and use my logic.

Actually, I think I thought of an easier way:

if global.score % global.extraLifeEvery < prevScore % global.extraLifeEvery:

@flossythesheep You should have posted the whole addScore() function so the context of your code snippet would have been apparent. With that little code we had to resort to guessing about what the prevScore actually stores. I happen to have guessed it "right" while @cybereality had a different (but also legitimate) guess so that was the point of confusion.

flossythesheep I did try multiple ignore statements, and @warning_ignore("integer_division", "integer_division") but they still persisted.

You're correct. I verified that in 4.0.3-stable and 4.1-rc2. It works in 3.5.2-stable, so it's a regression bug.
I submitted it on the tracker: #78957

@"cybereality" Yes tracking the previous 'threshold' step could work and yes your new solution will also work in my usage (small increments), nice, Is there still the issue of significant point jumps (more than the threshold itself) could cause it to miss the extra life? eg. life every 100 points. At 50 points score 110 points.

@xyz The original did work (although not pretty) and the OP was purely about the warnings so didn't think I needed to, but should have done as the thread progressed to changing the actual code. My bad.

@DaveTheCoder Thanks for confirming that

You can use a while loop rather than an if so you can account for multiple extra lives in one frame. Or save the difference between the values before the if (so you know if it's 2 extra lives) and add that rather than 1.