ID:154860   Nov 29 2011, 4:58 pm if(number/2 == uh?) Brain fail. Help please, how can I figure out if a variable number is odd or even?
 Nov 29 2011, 5:04 pm Modulus.
 Nov 29 2011, 5:07 pm I'd prolly use the % operator.
 Nov 29 2011, 5:17 pm if (number%2 == 0) Modulus(the % operator) returns the remainder of the division of those two numbers. So if the remainder is 0 it's divisible by 2.
 Nov 29 2011, 5:21 pm In response to Lugia319 Perfect, thanks.
 Nov 29 2011, 5:39 pm In response to Techgamer I know this has already been solved, but to be honest, Tech, this is not how you should help people. One word long responses that don't help unless you actually know what a modulus symbol is shouldn't be your reply to a good question. This forum is meant to be for improving people's knowledge of DM, and he asked a valued question that would enhance his understanding. You should respond with a general helpful reply, perhaps even a link if you're so inclined.
 Nov 29 2011, 6:12 pm In response to Oasiscircle Maybe I should have given a link explaining what Modulus is. But I'm of the opinion that leading someone to the answer and having them figure it out a little bit is better than just giving them the answer wholesale.
 Dec 2 2011, 4:48 am In response to Techgamer Even saying "you want to look up the modulus operator" would have been better than that one word answer.