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 [import]uid: 43191 topic_id: 7782 reply_id: 307782[/import]
jmp909
2
your code doesnt match your subject question. what are you trying to do?
[lua]for numberOfLives=0, 200, 1 do
if(numberOfLives%33==0) then
print(numberOfLives)
end
end[/lua] [import]uid: 6645 topic_id: 7782 reply_id: 27607[/import]
Hi thanks sorry was 3am here !
I meant every 33 times. So if number of lives hit every 33 times [import]uid: 43191 topic_id: 7782 reply_id: 27626[/import]
got it , the %33 was it ! [import]uid: 43191 topic_id: 7782 reply_id: 27630[/import]