|
JWhitney Wanderer
Joined: 20 Oct 2006 Posts: 51
|
Posted: Wed Jun 22, 2011 7:42 pm
Checking If Integer Is Divisible By.. |
Is there a way to evaluate a number to see if it is divisible by another number? For example, I have a kill counter, and every 10 or so kills I want to check some things with a trigger, but I don't want to have to reset the kill counter and set up #IF's for 10, 20, 30, etc kills.
I'm looking for something like:
#IF (@kills [IS DIVISIBLE BY] 10) {then do this}
I'm probably overlooking it, but thank you for any assistance you may offer.[/code] |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Jun 22, 2011 8:10 pm |
#IF (!%mod(@kills,10)) {then do this}
|
|
|
|
JWhitney Wanderer
Joined: 20 Oct 2006 Posts: 51
|
Posted: Wed Jun 22, 2011 8:42 pm |
Worked perfectly, thank you!
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|