Jul-23-2018, 12:42 AM
It's an order of operations error. The % operator evaluates with multiplication and division, as it is based on division. So 40 % 89 is calculated first, equaling 40, and then 40 is added to count. You need parens around the addition to force the order to what you want (doing the modulus after the addition).
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures