If number reaches every 100 - code?

Hi

This should be a simple one but I cant seem to find the answer.

Rather than doing:

if numberOfLives == 33 then
n = n + 1

elseif numberOfLives == 66 then
n = n + 1

elseif numberOfLives == 99 then
n = n + 1

...
...

Is there a way to make it know something like:

elseif numberOfLives == (every 33 times) then
n = n + 1

This would save me lines of code

Im sure Im missing something so obvious

please help

your code doesnt match your subject question. what are you trying to do?

1
2
3
4
5
for numberOfLives=0, 200, 1 do
  if(numberOfLives%33==0) then
    print(numberOfLives)
  end
end

Hi thanks sorry was 3am here !

I meant every 33 times. So if number of lives hit every 33 times

got it , the %33 was it !

views:869 update:2011/10/6 9:28:12
corona forums © 2003-2011