# Strange behaviour?

**URL:** <https://forum.kirupa.com/t/strange-behaviour/278089>\
**Category:** flash\
**Created:** [December 22, 2008, 9:42am UTC](https://forum.kirupa.com/t/strange-behaviour/278089 "2008-12-22T09:42:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliie](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@oliie](https://forum.kirupa.com/u/oliie)\
**Post date:** [December 22, 2008, 9:42am UTC](https://forum.kirupa.com/t/strange-behaviour/278089/1 "2008-12-22T09:42:40Z")

</div>

Ok, so I have this homemade calculator that doesn’t understand something.

I want this when var1 \> var2, var3 = 0, which works.  
But when var2 is like = 5000 and var1 = 600, var3 STILL equals 0! But if var1 = 400 var3 is 4600. Does the first number ruin everything?

Why is this? here’s the code btw:

onChanged = function() {  
if (var 2 \> var\_1) {  
var\_kvar = “0”;  
}else {  
var\_3 = var\_1 - var\_2;  
}  
}

UPDATE: Ok I solved it, remove thread!!
