ID:154860
 
if(number/2 == uh?)

Brain fail. Help please, how can I figure out if a variable number is odd or even?

Modulus.
I'd prolly use the % operator.
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.
In response to Lugia319
Perfect, thanks.
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.
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.

In response to Techgamer
Even saying "you want to look up the modulus operator" would have been better than that one word answer.