# \[Resolved\] Compare two int (=0) returns false?

**URL:** <https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222>\
**Category:** Community & Industry Discussion\
**Tags:** math, bool, unreal-engine, question\
**Created:** [December 27, 2017, 3:21pm UTC](https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222 "2017-12-27T15:21:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wzspdw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wzspdw](https://forums.unrealengine.com/u/wzspdw)\
**Post date:** [December 27, 2017, 3:21pm UTC](https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222/1 "2017-12-27T15:21:09Z")

</div>

![225196-qq截图20171227231624.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/8/4587f11ebf7b35cbdcb95de6f0e4be36c9bf06a3.jpeg)

Hey guys, i’m really confused that when i tried two compare two int which all equals zero, i got a false as result. i’ve tried to change the values but always get the same result, so is there a bug on this?

---

<div class="post-metadata">

**Author:** ![wzspdw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wzspdw](https://forums.unrealengine.com/u/wzspdw)\
**Post date:** [December 27, 2017, 3:31pm UTC](https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222/2 "2017-12-27T15:31:04Z")

</div>

As u see 0 - 0 = -1? … i cant tell whats wront with this

 ![225198-qq截图20171227232830.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/b/a3b62c836213108541abdabd98a51c9b7b46d5b6.jpeg)

---

<div class="post-metadata">

**Author:** ![wzspdw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wzspdw](https://forums.unrealengine.com/u/wzspdw)\
**Post date:** [December 27, 2017, 3:37pm UTC](https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222/3 "2017-12-27T15:37:11Z")

</div>

at last i also tried 1 - 1 ,and still get -1…no sense about this…

---

<div class="post-metadata">

**Author:** ![wzspdw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wzspdw](https://forums.unrealengine.com/u/wzspdw)\
**Post date:** [December 27, 2017, 3:46pm UTC](https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222/4 "2017-12-27T15:46:08Z")

</div>

So far i’ve figured out that the second value was not exactly the value as it showed. it equals it value plus 1 and i’ve no idea why it happened since there was not MATH PLUS at all…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dceb25d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dceb25d5](https://forums.unrealengine.com/u/anonymous_user_dceb25d5)\
**Post date:** [December 27, 2017, 4:01pm UTC](https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222/5 "2017-12-27T16:01:50Z")

</div>

Maybe try printing each value before hand so you know which is which, make an append string node and then connect it to the print string with the variables names listed for you when they print out.

---

<div class="post-metadata">

**Author:** ![wzspdw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wzspdw](https://forums.unrealengine.com/u/wzspdw)\
**Post date:** [December 28, 2017, 12:54am UTC](https://forums.unrealengine.com/t/resolved-compare-two-int-0-returns-false/413222/6 "2017-12-28T00:54:48Z")

</div>

Thx a lot, it worked! Um…Yep i finally found out that one early step seems to have some mistake so actually the value had not been changed correctly… my fault 🙂
