- Home /
Does anyone know why this is wrong?
if (detailsRegenyear1.cash1 >=(461,470)
i am trying to make it so if detailsRegenyear1.cash1 is greater than 461,462,463,464,465,466,467,468,469 and 470
You do realise I just fixed your code formatting and you undid it....
@tanoshimi's syntax is still correct.
The logic in your question makes little sense. If the result is higher then 470 it is be definition higher then all the other numbers.
Ok, so your amended question makes really little sense... did you mean that you want to know whether cash1 is between 461 and 470?
Answer by screenname_taken · Nov 02, 2014 at 10:59 PM
I think he means
if(detailsRegenyear1.cash1>=461 && detailsRegenyear1.cash1<471){
something
something
another
}
Answer by tanoshimi · Nov 02, 2014 at 09:47 PM
Take out the comma. And sort out the brackets.
if (detailsRegenyear1.cash1 >= 461470)
{ do something(); }
Your answer
Follow this Question
Related Questions
Making a plain number range 2 Answers
Mathf.Clamp an int value 4 Answers
Number Range 3 Answers
Divisible by 3 2 Answers
I need to make a door open only when the player's essence has reached a certain level 0 Answers