I am making a budgeting application, my problem is that the applicaiton that takes a value for TotCos and subtracts Amount Saved to give a value for the amount needed and then subtracts TotCos from Amount Saved to give amount left over. See code below:
TotCos.text = String(x);
var w:Number = Number(Sav.text);
var wx:Number = w-x
var xw:Number = x-w
Lef.text = String(wx);
Needed.text = String(xw);
if left.text=<0, display "0"
Not sure why this isnt working. Any help is much appreciated.
I'd guess that comparing Left.text to 0 is not what you mean to be doing. Try using this instead.
if (wx < 0)