# Is there a way to have an *if statement based on which stat is the higher?

#1

Just wondering if you can have a *if statement based on which stat is higher than the other.

For example, lets say you know two people and the one that you’re on better terms with is going to give you a job. It’s going to look weird with a choice for it, so can you have something like:

*if ( {Joe} > {Mark} )
Job A here

*if ( {Joe} < {Mark} )
Job B here

(where Joe and Mark have been set to a number, for example Joe might be a poor relationship stat with only 30 but Mark might be 70. I know that I could have a set if Joe is less than/more than but that isn’t going to work if both stats are low or high depending on your choices. But it still needs to select only one.)

I have a feeling that the the variables aren’t going to function well that way. Is there a way to do something like this?

#2

``````*if Joe > Mark
Job A here
*if Joe < Mark
Job B here
``````

#3

Huh, that was silly of me. Here I am thinking they’d need the brackets. Thanks @Carlos.R

#4

You can also use >= for greater than or equal to and <= for less than or equal to… so you’d probably want to have one of those, or a special case for *if Joe = Mark, so as to avoid bugs in situations in which the relationship scores are identical.

#5

It would actually be best to use:

``````*if joe > mark
Job A
*else
Job B
``````

You catch a lot more bugs using `*elseif` and `*else`.

#6

You can use brackets (without the \$ sign) in equations, it just means something very different than the variable names alone. Most people won’t need it.