Ways of checking score vaues

Hey
I have a variable which holds the score during gameplay. Now I want to spice up my game by giving away some bonus scores while the users are playing.

I thought I would check when the score is evenly divided by 1000 so every time the reach a thousand I can make an effect.

How can I check this?
[import]uid: 22737 topic_id: 6526 reply_id: 306526[/import]

[lua]for z = 0, 5000, 100 do

print(z, z/1000, math.floor(z/1000), z/1000 == math.floor(z/1000))

end[/lua] [import]uid: 6645 topic_id: 6526 reply_id: 22849[/import]

Hey
Thanks for that, could you comment the code a bit you think? I really appreciate your help. [import]uid: 22737 topic_id: 6526 reply_id: 22914[/import]

run it. you’ll see.

you can do it here
http://www.lua.org/demo.html

look at what the value of z is when the last column is “true”. which is what you are looking for. to check when the score is a multiple of 1000 [import]uid: 6645 topic_id: 6526 reply_id: 22997[/import]