Condition is returning true even if its not (Android)
everyone. My problem is really simple but I can't find the solution.
I have integer variable named points which currently have value of 684.
I'm making some kind of shop for a game where you can buy stuff with those
points and if you don't have enough points you can't buy specific item and
the item is colored gray.
The problem is that when I check if number of points is smaller than the
number of points that is required to buy a specific item the result is
always true even if its false.
if (points < 500) {
txtTitle.setTextColor(Color.rgb(185, 185, 185));
txtPrice.setTextColor(Color.rgb(185, 185, 185));
}
I have double checked that points are integer type have the value greater
than 500.
Any suggestions?
No comments:
Post a Comment