Is there a simple expression I could put into an if statement to check if a value is an int?
Something like this, to check if x
is an int:
x = 1
if (Diceroll() = 1)
{
x = x * 0.75
}
if (Diceroll() = 2)
{
x = x * 1.25
}
if (Diceroll() = 3)
{
x = x * 1
}
if (x != int)
{
consol.writeline("X is not an int")
}
if (x = int)
{
consol.writeline("X is an int")
}